我尝试在我们的网站中实施Google Api的Passs服务,但我们总是遇到错误400问题
我们遵循此文档 Giftcardclass: insert
我使用邮递员进行测试
POST https://www.googleapis.com/walletobjects/v1/giftCardClass
请求正文
{
"kind":"walletobjects#loyaltyObject",
"id":"test2.test",
"classId":"test.test",
"version":12,
"state":"active",
"issuername":"dsadasdasdas",
"barcode":{
"kind":"walletobjects#barcode",
"type":"ean13",
"value":"aaaa",
"alternateText":"aaaa"
}
}
jSon响应
{ "error": {
"errors": [
{
"domain": "global",
"reason": "invalidArgument",
"message": "Bad Request"
}
],
"code": 400,
"message": "Bad Request" }
}
从文档看来,仅需要id,issuerstate和reviewStatus。