You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 the onSubmit callback for when after the onPaymentDataChanged 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 the onPaymentDataChanged is resolved. Not triggering onSubmit 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 for onPaymentDataChanged 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):
Mac OS Sonoma 14.1.2
Google Chrome
The text was updated successfully, but these errors were encountered:
I tested on 6.x and I noticed the following: there are 2 moments that the onPaymentDataChanged is executed:
when the GooglePay overlay is initialized and it opens up: For this situation, I managed to reproduce the error that you showed above: onPaymentDataChanged is executed and the loader goes away even though the Promise is not resolved;
when the shopper changes the shipping address / delivery option: For this situation, it works as you described in the expected behavior. There is a loader in the UI (handled by the GooglePay overlay) and it goes away as soon as the Promise returned by the onPaymentDataChanged is resolved.
Can you tell me if you are experiencing the same flow on your side?
@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):
The text was updated successfully, but these errors were encountered: