Skip to content
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

Default OK and KO urls should use AfterUrl instead of TargetUrl #38

Open
DavidHernandez opened this issue Apr 30, 2020 · 2 comments
Open

Comments

@DavidHernandez
Copy link

In this lines:

if (false == $postData['Ds_Merchant_UrlOK'] && $request->getToken()) {
$postData['Ds_Merchant_UrlOK'] = $request->getToken()
->getTargetUrl();
}
if (false == $postData['Ds_Merchant_UrlKO'] && $request->getToken()) {
$postData['Ds_Merchant_UrlKO'] = $request->getToken()
->getTargetUrl();
}

The capture action sets as defaults for the merchant_urlko and merchant_urlok the value of targetUrl. The targetUrl value is the one that redirects to the Redsys platform. It should use the afterUrl, as it contains the url configured for the done action on the prepare.

If the code linked is executed, it creates a loop where the user is redirected again to the payment after doing the payment and this fails as the number ID has been already used.

Screenshot from 2020-04-30 16-12-28

@DavidHernandez
Copy link
Author

I can not find a way to configure the $postData['Ds_Merchant_UrlKO'] or the $postData['Ds_Merchant_UrlOK'], so I'm trapped in this redirection loop. How can I configure it without forking your code and doing the change I mentioned?

@h3llr4iser
Copy link

h3llr4iser commented Apr 30, 2020

I had made a pull request for that in 2018 but no reponse from repository admin:
#36

I am using my fork https://github.com/h3llr4iser/payum-redsys

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants