react-native-payments icon indicating copy to clipboard operation
react-native-payments copied to clipboard

Updating payment wizzard after init [Apple pay]

Open GFean opened this issue 3 years ago • 1 comments

I have such case in my app : I'm using both shipping address & shipping options. Shipping Options depend on the shipping address of the user, so before initialisation I have no idea which address does user have in his apple pay account and therefore can't shipping options should be set after the initialisation of the wizzard, according to shipping address. Package supports adding event listener on change this does work, but only when something changes. Is there any way to trigger an update after init of the wizzard ? Thanks a lot !

GFean avatar Apr 13 '21 23:04 GFean

Setting paymentRequest._shippingAddressChangesCount = 1 before displaying the sheet will trigger a shippingaddresschange event that you can use for that purpose

nmilcoff avatar May 31 '21 17:05 nmilcoff