#chocacao-elements-vue
1 messages · Page 1 of 1 (latest)
This is the setup :
Then getting payment intent from backend :
Then the payment part I guess :
cool so that last screenshot calls confirmPaymentIntent which uses the new PaymentElement. After a successful payment it redirects to a different page (your return_url from screenshot 1)
Is there a documentation on the exact results I can get from that call ?
there's no call
it's a full page redirect
it reloads the entire page in the browser
So then the whole code in between the brackets for the else section is useless ? Because I'm interested in showing to my user what happens if for example the payment was blocked
it's not useless.
We redirect only if the payment succeeds
if it doesn't then the await completes
Alright now I know more about how that works. So now, is there any exit code when the await completes ? like "canceled", "payment-failure"
because those are the responses I will have in Java for example
I'm not sure I understand sorry
this is purely Javascript. So you get a response if it fails
https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements#web-submit-payment it's all covered in details in our docs
maybe that helps? Even if you use Vue.js the JS lib is the same
Alright that documentation is perfect I was only checking the vue one. Thanks a lot.