#Sadness ;'(

1 messages · Page 1 of 1 (latest)

sharp pythonBOT
graceful nebula
#

this is not possible for iDeal

#

a full redirection is the only way possible

#

iDeal blocks the use of their webpage with the X-Frame-Options headers

prisma raftBOT
#

This thread has been archived. If you need help with anything else please ask in #dev-help or contact Stripe Support: https://support.stripe.com/contact

stiff snow
#

Hi again 😁 But is it possible to open it in another tab? I just don’t want to loose the original web page and handle the whole payment process on it.
Yes you can open in another tab if you like

cunning field
magic vessel
#

as far as I'm aware it's not actually possible, if you're using the PaymentElement. In any case, when the customer completes the auth they are going to get redirected to your return_url, so you're not going to have your original web page context anyway

#

these payment methods are inherently redirect based, it's just how it works and you need to build the site such that you can re-establish context when the user comes back(e.g. by having a cookie set on the browser that you recognise and can look up their cart when they come back, maybe in conjunction with dynamic URL params on the return_url).

cunning field
magic vessel
#

I don't think it would solve your issue really? Like you can open a new tab to iDEAL. When the customer is finished, that tab has to redirect somewhere.

cunning field
magic vessel
#

it doesn't make much sense that I would have your cart page open in one tab, then iDEAL opens in another tab, and then at the end I have two tabs, one with your cart and one with the 'payment success' page.

magic vessel
#

if you're dead set on that you could do it but I'd really suggest not, and just using a simple cart -> payment auth -> success page flow which is what the PaymentElement is designed for

stiff snow
#

Apologies for the confusion here -- I misinterpreted the previous discussion of return_url and iframe usage

cunning field
magic vessel
#

instead of doing window.location = action.redirect_to_url.url; like in that example you could open a new tab in JS for that URL(don't remember off the top of my head how that's done).
Then like I mentioned you'd need your return_url to be some script/endpoint on your server which updates local state etc that your original tab is polling for

graceful nebula
cunning field
magic vessel
#

AFAIK yes

cunning field
#

Thanks a lot.

#

If I will decide to use the custom flow, the only thing that bothers me is informing the another tab from backend about the payment. I think that websockets are suitable for that, but if stripe provides a function like that it would be nice to know about it.

magic vessel
#

we don't

#

but yep, you could use websockets on the original page and have your backend push something through them when the state changes

cunning field
# magic vessel we don't

Ok, thanks, good to know. Meanwhile I got another question. What happens with stripe redirection if I set the return_url to an empty string? Will it just “close” the payment tab?

magic vessel
#

you can't do that no

#
(index):1 Uncaught (in promise) IntegrationError: stripe.confirmPayment(): the `confirmParams.return_url` argument is required unless passing `redirect: 'if_required'`
    at y ((index):1:108794)
    at (index):1:402798
    at async HTMLFormElement.handleSubmit (checkout.js:57:19)