#gael_api

1 messages ยท Page 1 of 1 (latest)

ornate depotBOT
#

๐Ÿ‘‹ Welcome to your new thread!

โฒ๏ธ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question. Thank you for your patience!

โฑ๏ธ We automatically close idle threads, which makes them read-only. Make sure you stick around to chat in realtime! If this thread is closed and you have another question you'll need to start a new thread.

๐Ÿ”— This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1214216190461874236

๐Ÿ“ Have more to share? You can add more detail below, including code, screenshots, videos, etc.

rocky glacier
#

A snippet of my code

#

Is there an event that I can listen to just after client validation and before redirection?

unborn quailBOT
latent ingot
#

Hi there ๐Ÿ‘‹ I believe that is expected behavior. I'm not aware of a way offhand for your to provide a return_url that will close the user's current window and cause another window on their machine to perform a redirect.

rocky glacier
#

So I will end up with 2 shopping cart pages after payment?

#

confirmBancontactPayment changes the active url... if I put it in target="_blank", I will also have 2 pages in the end?

latent ingot
#

Quite possibly, is that what you're seeing in your testing?

I'm taking a closer look at what that function is expected to return and how you might be able to handle this.

#

Hm, looks like you're already using handleActions set to false, which was the best option I was thinking of to try to suppress the redirect behavior.

rocky glacier
#

My problem is when the customer validates the payment with you or on their bancontact application. The return_url is mandatory otherwise the confirmBancontactPayment crashes

latent ingot
#

Yeah, that's what I figured you would see, since the redirect for confirmBancontactPayment happens before any promises respond.

#

Can you do the authentication within the same window instead of opening a new one?

rocky glacier
#

The problem will be different. if I open the bancontact page to replace the cart page. When I come back with the return_url. The actions that have been made in the cart page will be reset since we arrive on a freshly updated page

latent ingot
#

For that you may be able to leverage query params on your return URL to pass along data so you can rebuild/retrieve the previous actions you're describing.

rocky glacier
#

Is there no other way? I don't understand why the return_url is mandatory. Since I can know if the payment is successful or not with the webhook

#

This is a test page. but I lose all the previous information

latent ingot
#

It's required because we need to know where to send the customer once they complete the authentication flow.

#

Why isn't your success page retrieving the state of the completed payment?