#Sadness ;'(

1 messages · Page 1 of 1 (latest)

keen lintelBOT
wheat citrus
#

Hi!

#

Then for something like a Card PaymentMethod the customer won't be redirected, and you can then handle the redirect yourself

fast gyro
#

But what for example for iDEAL?

#

I mean the redirects that are triggered by stripe.js

#

That are required to complete payment

wheat citrus
#

Yeah no this isn't possible to stop the redirect from occurring for a bank-based redirect. You would just redirect again after that point if you want to handle it yourself

fast gyro
#

To clarify I use payment element

wheat citrus
#

That is handling confirmation server-side

#

Not client-side

fast gyro
#

Is there really no way to handle the redirect manually?

wheat citrus
#

Not with Payment Element, no. Since you are relying on client-side confirmation.

#

Like if you try to set return_url when you create the PaymentIntent you will see an error that states you can only set that if you are also passing confirm: true

#

There actually would be a really hacky workaound here where you listen for the selector for Payment Element then if the customer selects a bank-based redirect and hits "pay", then instead of calling confirmPayment you create a new (ideal for example) PaymentMethod and PaymentIntent server-side and confirm it while setting return_url

#

Then you can handle the redirect yourself

#

But that is super hacky and I don't recommend it

fast gyro
#

What are problems with it.

#

Why is it needed to confirm payment on the server?

fast gyro
#

@rugged sable Could you take a look at this thread?

rugged sable
#

Hi one moment

#

Unfortunately there's not another way other than what my colleague outlined above

fast gyro
#

What if i will confirm the payment directly via API?

rugged sable
#

On the server? If so, that is server-side confirmation which is a different flow (the one you linked before)

fast gyro
fast gyro
#

Client somehow gets this url

#

It's not a magic

rugged sable
#

Yeah but there's not a way to redirect manually

#

As my colleague stated

fast gyro
#

It is kind of confusing

rugged sable
#

That's the only one I can think of

fast gyro
#

Thanks for your help, I will think more about this problem and if I would need help, I will ask on dev-help. Have a good day!