#gael_api
1 messages ยท Page 1 of 1 (latest)
๐ 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.
A snippet of my code
Is there an event that I can listen to just after client validation and before redirection?
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.
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?
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.
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
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?
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
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.