Skip to content

ageVerification

Note: Age identity authentication requires hardware support. If your vending machine does not have this device (you can check if it is included based on the order), you can skip this step.

setAgeScope

Set age restriction.

kotlin
// serial driver
private lateinit var driver: UBoard

fun your_method() {
    // eg: You can drink at 18
    val para = ASReplyPara(18)
    this.driver.setAgeScope(para)
}

ASReplyPara Attribute Description

AttributeTypeDefault ValueDescription
ageIntRestrict age.

getAuthResult

Check if identity authentication was successful.

kotlin
// serial driver
private lateinit var driver: UBoard

fun your_method() {
    val para = ARReplyPara()
    this.driver.getAuthResult(para)
    println("para status: ${para.status}")
}

ARReplyPara Attribute Description

AttributeTypeDefault ValueDescription
statusint0 - No card swiped
1 - Identity authentication successful
2 - Identity authentication failed
3 - Error (e.g., device not connected)

© All rights reserved. Dingshang Metal Products Co., Ltd.