-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The "return to the store" link generates an error once the customer is redirected to the store #249
Comments
Hello @julienTroopers , as far as I know from the API documentation, we can only provide a return URL. The token is consumed automatically on the first visit (payum internal work), so we cannot re-use the initial URL. How do you manage to get redirected and then also use the return to the store link? |
My guess is that the redirection call emanates from Payplug rather than the customer browser. In any case, the store receives both requests, and the second one fails. We'll look into setting up a demo with @gabrielmustiere |
I get it, it can happen if you click on the link right when the auto redirection starts, so the browser is making two requests, not PayPlug. I think that there is nothing to do on the plugin side because this is the standard way to handle it "sylius.controller.payum::afterCaptureAction()". Maybe you could decorate this action to early redirect to another page if the token is already consumed? |
Well, I tried it on a brand new Sylius installation and ... I didn't notice the problem. |
@TheGrimmChester is right, it can happen if you click on the link right when the auto redirection starts. It also happens if the shop is too slow to respond : as long as the PayPlug page is visible, it can trigger the second redirection. Clicking the "return to the store" link on PayPlug does not cancel the countdown to 'their' redirection. In our case, it happens as we have a few callbacks when the payment is confirmed. It also happens if I turn on the energy saving feature on my laptop running a brand new Sylius installation : it slows both the store and the browser, leading to more frequent issues :-) I'll close the issue, thanks for your help. |
Sylius version : 1.12.11
SyliusPayPlugPlugin version : 1.9.2
After a successful card payment on the payplug page :
sylius_shop_order_after_pay
route.I am unsure of how to proceed with this issue.
Should the plugin generate another token+URL to send to payplug for the "return to the store" link ? Is it possible ?
The text was updated successfully, but these errors were encountered: