#KevH-wallets-shipping
1 messages · Page 1 of 1 (latest)
The problem is the event from “shippingaddresschange” does not include the currently active shipping option so from the code I don’t know it has been reset
you want this event instead https://stripe.com/docs/js/payment_request/events/on_shipping_option_change
as for as I understand it, this behaviour with the options changing when the address does is something controlled by the browser as it's internal to how they implement the PaymentRequest, so unfortunately sometimes the behaviour in the popup sheets won't be completely consistent, they're native to each platform.
but yeah either way, you'd generally listen to the shippingoptionchange event and call updateWith to change the price.
hmm, weird, it should be as far as I know!
I'm trying to test it but Apple Pay seems to be broken on my machine right now for some reason and I can't change any of the payment details in the popup
it fires as expected when I change the option manually, but when the address is changed and apple decides to reset the shipping option. Only the address event it fired.
ah ok
ok I got it to work and I see the same
it's probably just a quirk of Apple's implementation unfortunately, I think I've heard it being mentioned before
are there any known solutions?
will it cause problems the amount the sheet displays being different to the amount I will be actually charging? Apart from the obvious customer confusion.
you can get the final selected option as part of the paymentmethod event so you can compute the total you need to charge at that point at least. But yeah, totally agree it seems like an annoying problem. No workaround I know of
you could write to https://support.stripe.com/email as a bug, but my guess is it's on Apple's side and they don't fire the event(https://developer.apple.com/documentation/apple_pay_on_the_web/applepaysession/1778028-onshippingmethodselected) that our library is wrapping around, in this specific flow