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.

In this lines:
payum-redsys/Action/CaptureAction.php
Lines 57 to 64 in b7544bd
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.