#haydon-applepay-web
1 messages ยท Page 1 of 1 (latest)
Hi ๐
Are you integrating Apple Pay directly or using a Stripe produt like the Payment Request button?
not sure exactly how to answer that, but we are using stripe with react. ill provide the flow we use
stripe = useStripe()
pr = stripe.paymentRequest(opts)
pr.on('cancel', () => {
pr.abort() << errors here
// other business logic
}
pr.show()
How do you trigger Apple Pay?
Got it. And the error you are seeing is that we do not expose an abort method?
the abort method exists on my side pr.abort() works - but it errors on stripe js's side
so in my error trace i can click through to abort and it takes me to stripe's source code here
this.abort = function() {
n._privateSession && n._privateSession.abort()
},
thats where the error originates
We don't expose or document this behavior in our official docs. So we do not support using it and do not guarantee that we won't break these interfaces, I'm sorry to say.
no worries, im missing some context as i wasn't the one who implemented this in my team - but it's as you say, i cant see abort in your docs. thanks for the help
You can review our docs on implementing Apple Pay here: https://docs.stripe.com/apple-pay
thanks ๐ looks like calling abort is something you can do with apple pay while the modal is open - calling it inside of cancel fails because the modal is already closed, hence the error ๐
Okay cool, that makes sense
thanks for the help, and enjoy your evening!
Thanks! You too ๐