-
Notifications
You must be signed in to change notification settings - Fork 213
Description
Describe the bug
When using the Google pay express checkout button, the first time you click it, it will prompt for shipping address and method selection, so that you can complete the checkout in one step. However, if you close the google pay popup and then re-open it, it won't prompt for the shipping method and options the 2nd time.
This is caused by a consignment being created the first time you open it using the address in Google Pay, and then on the second time it already has a consignment so it doesn't include address and methods in the google pay window. This is despite the address being malformed in the consignment, so the user is required to actually go through the regular shipping step and enter their address and choose a shipping method.
I think there are 2 potential fixes.
-
The onError callback is not currently called when the PaymentMethodCancelledError is thrown. If it's thrown then we can handle it outside the checkout-sdk to remove the created consignment when there's an error
-
A requireShippingAddress prop can be added to the initialize options for Google Pay which and when true it can request the ship[ping address and methods, regardless of whether there is already a consignment.
To Reproduce
Steps to reproduce the behavior:
- Go to a checkout
- Click on a Google Pay express button
- Close the google pay popup after it initializes
- Click again on the Google Pay express button
- The shipping address and method will no longer be requested
Expected behavior
When using the express checkout button, the shipping address and method should always be requested so the user can checkout in one click
Screenshots
First time
Second time
