google-wallet / rest-samples

Samples for the Google Wallet REST APIs
https://developers.google.com/wallet/
Apache License 2.0
272 stars 117 forks source link

Barcode type must be set error since update #108

Open dcr31000 opened 8 months ago

dcr31000 commented 8 months ago

Hello,

I'm using the PHP generic card sample.

Since I updated my dependencies:

I got this error from Google API: { "error": { "code": 400, "message": "Barcode type must be set.", "errors": [ { "message": "Barcode type must be set.", "domain": "walletobjects", "reason": "invalidResource" } ] } }

Did you experience something like this recently ?

Thanks

smitterko commented 1 month ago

I had run into this issue as well and reached out to the Google Wallet API support team (thank you team!!). You can set the barcode to null to hide. I was trying to use "UNSPECIFIED" like in their demo but that doesn't seem to work anymore. Maybe this'll help someone who is googling this issue like I was.