Skip to content

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

Description

@DavidHernandez

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions