I've been trying to implement Google Pay by following the Google Pay API PaymentRequest Tutorial. I have everything implemented, however when I try to test on my Android phone, I get the following popup:
Request Failed
An unexpected error has occurred. Please try again later.
I've followed the troubleshooting guide, and using ADB I can see the following error:
WalletMerchantError: Error in loadWebPaymentData: PaymentDataRequest.transactionInfo is required
This seems to imply that transactionInfo should be included in my paymentMethods object. However, the tutorial states otherwise:
The
transactionInfoproperty should be omitted. Total price and currency should instead be specified in thedetailsargument passed to PaymentRequest
Any advice?
I recently ran into this error myself.
My own experience was that it worked with Chrome Desktop but failed on Chrome Android. I've reached out to the Google Pay team and they have acknowledge that this is a bug. No ETA on resolution for this.
The general advice is to integrate with the using the Google Pay JavaScript library instead (see: https://medium.com/dev-channel/web-payments-payment-request-api-and-google-pay-a1073e405235)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With