Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Recommended Posts

Posted

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));
	}

Posted

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

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...