latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Authorize.Net Error messages

Home Forums Community Forum Authorize.Net Error messages

This topic contains 2 replies, has 2 voices. Last updated by  Raam Dev 4 years, 3 months ago.

Topic Author Topic
Posted: Monday Sep 3rd, 2012 at 5:59 am #23920

Are error messages about the payment processing handled by s2Member or are they just passed through from Authorize.Net API? Client was asking if we can customise the error message by removing the error code.

List Of Topic Replies

Viewing 2 replies - 1 through 2 (of 2 total)
Author Replies
Author Replies
Posted: Monday Sep 3rd, 2012 at 9:28 pm #23974
Raam Dev
Username: Raam
Staff Member

Hi Thomas,

Good question! I will consult with the lead developer on this and get back to you. Thank you for your patience.

Posted: Thursday Sep 13th, 2012 at 9:31 pm #25228
Raam Dev
Username: Raam
Staff Member

Hi Thomas,

My apologies for the delay on this. I heard back from the lead developer and this is what he said:

“Great question. s2Member Pro does support response filters from the Authorize.Net APIs.

Please create this directory and file to eliminate the response code from the error message, and instead report only the textual representation reported by Authorize.Net. With a little more hacking/understanding, a site owner could certainly work some magic of their own (i.e. custom messages for certain error codes).”

/wp-content/mu-plugins/s2-hacks.php

<?php
add_filter('ws_plugin__s2member_pro_authnet_aim_response', 'my_authnet_response_filter');
add_filter('ws_plugin__s2member_pro_authnet_arb_response', 'my_authnet_response_filter');

function my_authnet_response_filter($response = array())
{
	if(!empty($response&#91;'__error'&#93;))
	{
		$response&#91;'__error'&#93; = $response&#91;"response_reason_text"&#93;; // Use error text only (excluding error codes).

// See also: $response&#91;'response_reason_code'&#93; to help identify certain response codes (if you like).
// When debugging, use print_r($response) for a full list of data about each response.
// Also check the /s2m-pro-extras.zip file, for the documentation regarding the Authorize.Net API error codes.
	}
	
	return $response;
}
?>
Viewing 2 replies - 1 through 2 (of 2 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.