Closed joakimmillen closed 2 weeks ago
Hi @joakimmillen ,
I tested on 6.x and I noticed the following: there are 2 moments that the onPaymentDataChanged
is executed:
onPaymentDataChanged
is executed and the loader goes away even though the Promise is not resolved;onPaymentDataChanged
is resolved.Can you tell me if you are experiencing the same flow on your side?
@ribeiroguilherme yes I have the same experience, thank you
@joakimmillen that is an issue on the GooglePay side - they are working on the fix. The GooglePay github issue is linked here, so you can follow up there if you wish. Thanks for flagging it
Describe the bug Trying to upgrade 5.x to 6.x I noticed an issue with the google pay express callback
onPaymentDataChanged
.The behaviour for us with 5.x was that while
onPaymentDataChanged
was running, you could still click the "pay" button in the google pay window. This seemed to queue up theonSubmit
callback for when after theonPaymentDataChanged
promise was resolved and then just carry on correctly after that.With 6.x the behaviour is that if I click "pay" before the
onPaymentDataChanged
is done it will either start "loading" and then stop loading when theonPaymentDataChanged
is resolved. Not triggeringonSubmit
or any other callback, just acting as though I never clicked on Pay. It might also throw an error:which makes sense, since I try to submit while the change handler is still running.
Expected behavior The ideal solution would be if the google pay window would actually be in a loading state while the
onPaymentDataChanged
callback is running. I made sure that it was actually returning a promise that was resolved 5 seconds later to be sure that it was actually still running while the google pay window seemed to be "ready". I would assume that the reason foronPaymentDataChanged
to return a promise is so that google knows that it is busy and should be loading.The other behaviour would be the 5.x way where I can click the button but it seems to queue up the callbacks somehow? We have the same issue there with
onPaymentDataChanged
still running but I can click the pay button. This never results in the error in the provided image though, that only happens on 6.x.Desktop (please complete the following information):