3

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 transactionInfo property should be omitted. Total price and currency should instead be specified in the details argument passed to PaymentRequest

Any advice?

David Mihal
  • 944
  • 6
  • 23

2 Answers2

2

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)

Soc
  • 7,425
  • 4
  • 13
  • 30
0

Did you succeed with this integration? according to Google documentation it is not recommended to use Payment-Request-API for using Google Pay eWallet, as it said here:

Chrome for Android is currently the only web browser supporting the Payment Request API with third-party payment methods, including Google Pay. Sites wishing to implement Google Pay as a standalone payment method should use the Google Pay API JavaScript client library with a branded Google Pay button to reach a broader Google audience across multiple browsers and platforms.

GyRo
  • 2,586
  • 5
  • 30
  • 38