使用Google Play服务API将会员卡添加到Google Pay应用时遇到问题。在Google付款请求后,我得到了帐户验证,但我收到了400条日志。
找不到问题所在...
下面的代码是按照本指南编写的:
https://developers.google.com/pay/passes/guides/overview/basics/typical-api-flow
附加代码(看一下注释,这很重要)
// is 9999999
val userId : String = usr.idUser.toString()
// value is "John Snow"
val fullname : String = usr.fullname
// ISSUER_ID - is numeric value from console
val wob = LoyaltyWalletObject.newBuilder()
// the class id has similar name. All characters has been replaced with 'x' character
.setClassId("$ISSUER_ID.xxxx.xxx.xxxxxxxxxxxx.xxxxxxxxxx")
// similar to comment from method setClassId
.setId("$ISSUER_ID.xxxx.xxx.xxxxxxxxxxxx.xxxxxxxxxx.$userId")
.setState(WalletObjectsConstants.State.ACTIVE)
// id of user in app
.setAccountId(userId)
// name of user in app …Run Code Online (Sandbox Code Playgroud)