#Muhammad Awais

1 messages · Page 1 of 1 (latest)

shy breachBOT
normal nacelle
#

Potentially yes. Your integration should assume 3DS/auth could be requested for all payments regardless of card country/origin

jade bloom
#

And it always have to be redirected another website?

#

I am integrating the stripe in SPA

normal nacelle
#

What's the actual problem you're trying to solve?

jade bloom
#

I am just trying to handle all the case for stripe elements

normal nacelle
#

Ok, but why would US cards be different? If you're using confirmPayment then the integration will handle all 3DS redirects automatically

jade bloom
#

I read somewhere that 3D secure is mostly in European countries

jade bloom
normal nacelle
#

Just not sure why that'd concern you if you're using Elements and Stripe.js – that integration will handle 3DS for all cards whenever requested, regardless of country

jade bloom
normal nacelle
normal nacelle
jade bloom
#

ok

#

I have asked the user billing details, captured the required amount,
Now I have created another off session payment intent and it throws an error

How can I update my existing stripe element for this new payment intent?

normal nacelle
#

What's the error?

jade bloom
#

Maybe insufficient funds

#
                elements.value = stripe.value.elements(
                    {clientSecret: paymentIntent.clientSecret}
                )
#

would that work?

normal nacelle
jade bloom
#

so above won't work?
I think that's replacing the old elemnts with new one?

normal nacelle
#

No I don't think it will

jade bloom
#

Is there a method to unmount the existing element?

normal nacelle
#

But that won't help for what you need to do. You don't need to unmount the Payment Element, but the Elements instance

jade bloom
#

so cardElement.destroy(); ?

normal nacelle
#

As I said, if you're Payment Intent values are constantly updating (like a cart scenario where your customers update quantities, add/remove items) then you're better off using the deferred flow

normal nacelle
jade bloom
#

card element

#

With payment intent

normal nacelle
#

Then I'm not sure why you're passing the clientSecret argument to the Elements instance

jade bloom
normal nacelle
#

That's only needed for the Payment Element, otherwise you pass ity when you call confirmCardPayment

#

Ok, so you are using the Payment Element

jade bloom
#

I was thinking this is a card element, what's the diff?

normal nacelle
jade bloom
#

so for payment element what do I need to do to assign another payment intent's client secret?

normal nacelle
#

You need to initialise a new Elements object via elements.create. They can't be updated