google-pay-button: Updating the payment request payload with an updated amount causes the Google Pay button to disappear and then reappear
Summary:
The issue is specific to Android Chrome. Updating the payment request payload with an updated amount causes the Google Pay button to disappear and then reappear. Console logs show errors that are not present in other environments.
These are the console logs shown.
2 x Use JsonReader.setLenient(true) to accept malformed JSON at line 1 column 10
4 x Unable to download payment manifest "https://pay.google.com/gp/p/payment_method_manifest.json"
each time we update the paymentRequest payload.
The actual processing and display of card information work fine.
Steps to reproduce:
Programmatically update the amount in the payment request payload. The Google Pay button disappears and then reappears.
Expected behaviour:
The Google Pay button should remain visible while reloading payment data, and there should be no error console logs.
Screenshots:
A video attachment demonstrates the issue.
https://user-images.githubusercontent.com/9338759/236343163-863e7103-c77d-46b4-b6b1-96879d7758b4.mov
Component information:
Component: React component (@google-pay/button-react) Component versions: 3.0.0, 3.0.6, 3.0.9 Environment:
Device:
Moto G51 5G OS: Android Version 12 Browser: Chrome Country/region: Australia
Additional context:
The issue only occurs in Chrome Android and not in any other browser across various platforms.
About this issue
- Original URL
- State: closed
- Created a year ago
- Comments: 18 (8 by maintainers)
version 3.0.10 should contain the fix. See #239
@glennweb / @xiaomei-wu could you update your dependency to
"@google-pay/button-react": "3.0.10"
and try again here: https://google-pay-react-sfxj5f.stackblitz.io@glennweb could you create a re-producer on something like https://stackblitz.com and then share a link? - that would greatly help us to have a look at the issue.