#changmin-shippingaddresschange-apple-google-pay
1 messages · Page 1 of 1 (latest)
Hi Hanzo, Thank you for your help
is there anyway to trigger the shippingaddresschange with the event has updatewith()?
Let me check
curious if there's a reason behind why you'd want to trigger it manually
Becaues only 'shippingaddresschange' and 'shippingoptionchange' has updatewith()
Sometimes we partial update our page, then need to update the pop detail items.
I know there is another function paymentRequest.update(), but this can only update before the popup showing
ah okay. Looking into workarounds but highly doubt that it is supported.
Ok, thank you
paymentRequest.update() always has this problem
'You cannot update Payment Request options while the payment sheet is showing.'
SO I can only use updatewith()
event.updateWith()
hmm not seeing any alternatives here
You'd really just want to close the paymentsheet before making any changes and handle them with paymentRequest.update()
yes, I mean,the first time I open the popup, 'shippingaddresschange' triggered automatically, but then, second time when we partial update our page and open it again, the 'shippingoptionchange' not triggerd, so I cannot use updateWith(), I can only use update(), that means I need to keep 2 methods to update.
paymentRequest.update() can only use before the paymentRequest.show(), that means I need to event.preventDefault() at very first.
and warning shows like this
AFAIK shippingoptionchange is triggered by the payment sheet changes and cannot work with manual triggers.
the same with shippingaddresschange, right?
yup
and updatewith() can only working with this 2 event, no other object can call updatewith()?
That's correct
paymentRequest.update() can only use before the paymentRequest.show(), that means I need to event.preventDefault() at very first. right?
Technically, you can use paymentRequest.update() when the payment sheet isn't showing