I should have detailed the code differences to enable anyone who has heavily modified their site - (and cannot simply 'drop-in' a copy of the protx_form.php file) - to do the changes manually here.
So here goes....
removed $Status = $values['Status'];....... you could just add // to the front of this line I suppose to comment it out)
Line 247 Changed
$Status = $values['Status'];
$StatusDetail = $values['StatusDetail'];
to
$StatusDetail = $values['StatusDetail'];
Line 252 Replace Section of Code
if ($Status != 'OK') {
$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 );
}
}
with this
switch ($values['Status']) {
case "OK":
case "AUTHENTICATED":
case "REGISTERED":
$Status = true;
break;
default:
$Status = false;
break;
}
if ($Status !== true) {
$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 );
}
}
For easiness this is the full section of code I have changed below. Starts about Line 240 (function before_process section)
function before_process() {
global $HTTP_GET_VARS, $crypt;
$crypt = $_REQUEST['crypt'];
$process_button_string = str_replace(" ", "+", $process_button_string);
$Decoded = $this->SimpleXor(base64_decode(str_replace(" ", "+", $crypt)),MODULE_PAYMENT_PROTX_FORM_PASSWORD);
$values = $this->getToken($Decoded);
$StatusDetail = $values['StatusDetail'];
//SofaKing Added for Authenticate and Authorise
switch ($values['Status']) {
case "OK":
case "AUTHENTICATED":
case "REGISTERED":
$Status = true;
break;
default:
$Status = false;
break;
}
if ($Status !== true) {
$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 );
}
}
//EOF : SofaKing Added for Authenticate and Authorise
Edited by sofaking, 05 August 2007, 07:59.