#Alan Tse

1 messages · Page 1 of 1 (latest)

lost scaffoldBOT
shy hull
#

Can you describe the actual issue you're facing? I think the issue you've linked is largely unrelated

austere ether
#

using the Payment Request button to trigger its onclick, in the onClick handler I have the async logic and subsequent call, has an error after invoke paymentRequest.show() method

handleInstantPayButtonClick = (e) => {
e.preventDefault()
makeApiRequest().then((response) => {
paymentRequest.update(response)
paymentRequest.show()
}
}

shy hull
#

Yep, that's a recent change in the Apple Pay APIs that requires .show() to be called ~immediately after the initial click

#

I'm not really aware of an away around that right now, other then to move your asynchronous call further up/down your stack

austere ether
#

Is there any way around this mechanism? Sorry, discord just crashed

#

「requires .show() to be called ~immediately after the initial click」