wallet-samples icon indicating copy to clipboard operation
wallet-samples copied to clipboard

Barcode type must be set error since update

Open dcr31000 opened this issue 1 year ago • 1 comments

Hello,

I'm using the PHP generic card sample.

Since I updated my dependencies:

  • Upgrading google/auth (v1.30.0 => v1.34.0)
  • Upgrading google/apiclient-services (v0.317.0 => v0.332.0)
  • Upgrading google/apiclient (v2.15.1 => v2.15.3)

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

dcr31000 avatar Jan 18 '24 16:01 dcr31000

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.

smitterko avatar Aug 09 '24 14:08 smitterko