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.

trigger EOT programatically

Home Forums Community Forum trigger EOT programatically

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

Topic Author Topic
Posted: Monday Jun 10th, 2013 at 12:40 pm #51719

So here is the situation we’re trying to accomplish. Whenever a payment is declined for any reason, we want to immediately demote users and/or cancel them out. We noticed issues when a particular payment number was above 1. (using authorize.net)

Now… what we’ve managed to do is manually set the EOT date accordingly. On the wordpress side, that seems to be working correctly. However, what we notice is that on the Authorize.net side, the ARB is not cancelled out. For this particular process, we are not wanting the user to have to use a cancel form and are wanting to handle everything based on EOT date. So, the question is:

How do we programatically cancel a user based on ARB subscription ID?

List Of Topic Replies

Viewing 4 replies - 1 through 4 (of 4 total)
Author Replies
Author Replies
Posted: Tuesday Jun 11th, 2013 at 5:13 am #51750
Bruce
Username: Bruce
Staff Member

How do we programatically cancel a user based on ARB subscription ID?

I believe what you’re asking is how to cancel a User’s Recurring Profile in Authorize.Net from your site. The best way to find the correct way to do this is to check the following file:

/s2member-pro/includes/classes/gateways/authnet/authnet-cancellation-inc.inc.php

I believe the correct syntax to do this would be the following:

$request = array ("x_method" => "cancel", "x_subscription_id" => $subscription_id);
c_ws_plugin__s2member_pro_authnet_utilities::authnet_arb_response ($request);
Posted: Tuesday Jun 11th, 2013 at 9:39 am #51764

woohoo! rock on. gonna give this a go. Thanks… will report our results.

Posted: Saturday Jun 15th, 2013 at 9:05 am #51996

this did not seem to work. is there something that is missing from that code above?

Posted: Tuesday Jun 18th, 2013 at 12:25 pm #52112
Bruce
Username: Bruce
Staff Member

this did not seem to work. is there something that is missing from that code above?

This is the correct way to handle this. You can do this to find out why it’s not cancelling the profile:

$request = array ("x_method" => "cancel", "x_subscription_id" => $subscription_id);
$response = c_ws_plugin__s2member_pro_authnet_utilities::authnet_arb_response ($request);

$response['response_code']; // This variable is the response code that Authorize.Net should give you after you send the request. See what this says.
Viewing 4 replies - 1 through 4 (of 4 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.