snook789 Posted April 30, 2006 Posted April 30, 2006 Were using Authorize.net Consolidated v1.7 and want to add the responds message from Authorize.Net on why the order is getting declined. Such as 3 digit card code does not match Street Address does not match etc Here is the area of code in authorizenet.php that I found where we would edit for this, but was unable to find how to do this in searching the forums (seems this Contrib has been removed) Appricate any help // Change made by using ADC Direct Connection $response_vars = explode(',', $response[0]); $x_response_code = $response_vars[0]; $x_response_subcode = $response_vars[1]; $x_response_reason_code = $response_vars[2]; $x_response_reason_text = $response_vars[3]; if ($x_response_code != '1') { tep_db_query("delete from " . TABLE_ORDERS . " where orders_id = '" . (int)$insert_id . "'"); //Remove order if($x_response_code == '') { tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode('The server cannot connect to Authorize.net. Please check your cURL and server settings.'), 'SSL', true, false)); } else if($x_response_code == '2') { tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode('Your credit card was declined ') . urlencode('(') . urlencode("$x_response_reason_code") . urlencode('): ') . urlencode("$x_response_reason_text"), 'SSL', true, false)); } else if($x_response_code == '3') { tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode('There was an error processing your credit card ') . urlencode('(') . urlencode("$x_response_reason_code") . urlencode('): ') . urlencode("$x_response_reason_text"), 'SSL', true, false)); } else { tep_redirect(tep_href_link(FILENAME_CHECKOUT_PAYMENT, 'error_message=' . urlencode('There was an unspecified error processing your credit card.'), 'SSL', true, false)); } Quote
snook789 Posted May 1, 2006 Author Posted May 1, 2006 I guess what I am looking for is If someone has added a list of x_response_reason_code & x_avs_code return from Authorize.Net, with custom messages to be posted back to the user on why their card is getting declined. Thanks Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.