Hi Vger. I've added the Visa and M/C logos to the payment page.
I'm trying to figure out how to get the error messages to display on the payment page when people get dumped back because their cards are declined. I think that the code to modify is below. Could you or someone please help me with getting the errors to display in the body of the page rather than in the url? It would be great if different error messages were displayed for each of the different responses from A.net. Thanks much.
// Parse the response code and text for custom error display
$response_code = explode(',', $response[0]);
$response_text = explode(',', $response[3]);
$x_response_code = $response_code[0];
$x_response_text = $response_text[0];
// If the response code is not 1 (approved) then redirect back to the payment page with the appropriate error message
if ($x_response_code != '1') {
tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . $x_response_text . ' - ' . urlencode(MODULE_PAYMENT_AUTHORIZENET_AIM_TEXT_DECLINED_MESSAGE), 'SSL', true, false));
}
}
function after_process() {
return false;
}
function get_error() {
global $_POST;
$error = array('title' => MODULE_PAYMENT_AUTHORIZENET_AIM_TEXT_ERROR,
'error' => stripslashes(urldecode($_POST['error'])));
return $error;
}