#chocacao-elements-vue

1 messages · Page 1 of 1 (latest)

minor laurel
#

Can you share your exact code for the PaymentIntent confirmation?

tired yoke
#

This is the setup :

#

Then getting payment intent from backend :

#

Then the payment part I guess :

minor laurel
#

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)

tired yoke
#

Is there a documentation on the exact results I can get from that call ?

minor laurel
#

there's no call

#

it's a full page redirect

#

it reloads the entire page in the browser

tired yoke
#

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

minor laurel
#

it's not useless.

#

We redirect only if the payment succeeds

#

if it doesn't then the await completes

tired yoke
#

because those are the responses I will have in Java for example

minor laurel
#

I'm not sure I understand sorry

#

this is purely Javascript. So you get a response if it fails

#

maybe that helps? Even if you use Vue.js the JS lib is the same

tired yoke
#

Alright that documentation is perfect I was only checking the vue one. Thanks a lot.