PDA

View Full Version : Protx Form Payment Module



michael_s
07-08-2007, 05:35 AM
Hi.

When testing this submission I discovered that the redirect back from Protx when the user hit Cancel failed.

The reason turned out to be the use of HTTP_POST_VARS as the redirect back from Protx is a GET.

Simply replace the function before_process with this:

----8SimpleXor(base64_decode(str_replace (" ", "+", $crypt)),MODULE_PAYMENT_PROTX_FORM_PASSWORD);
$values = $this->getToken($Decoded);

$Status = $values['Status'];
$StatusDetail = $values['StatusDetail'];

if ($Status != 'OK')
{
// CWS Fix start
$sessionName = tep_session_name();
$sessionId = $HTTP_GET_VARS[$sessionName];
$hrefLink = tep_href_link(FILENAME_CHECKOUT_PAYMENT, tep_session_name() . '=' . $sessionId . '&error_message=' . urlencode($StatusDetail), 'SSL', false, false);
tep_redirect( $hrefLink );
// CWS fix end
}
}
---8