#haydon-applepay-web

1 messages ยท Page 1 of 1 (latest)

magic birchBOT
pastel robin
#

Hi ๐Ÿ‘‹

Are you integrating Apple Pay directly or using a Stripe produt like the Payment Request button?

green ingot
#

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()
pastel robin
#

How do you trigger Apple Pay?

green ingot
#

thats just pr.show()

pastel robin
#

Got it. And the error you are seeing is that we do not expose an abort method?

green ingot
#

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

pastel robin
#

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.

green ingot
#

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

pastel robin
green ingot
#

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 ๐Ÿ˜„

pastel robin
#

Okay cool, that makes sense

green ingot
#

thanks for the help, and enjoy your evening!

pastel robin
#

Thanks! You too ๐Ÿ‘‹