If you're using PayPal® Pro integration, you can do this in PHP.
- Code: Select all
<?php
$user_id = "1";
$subscr_id = get_user_option("s2member_subscr_id", $user_id);
$paypal = array ("METHOD" => "GetRecurringPaymentsProfileDetails", "PROFILEID" => $subscr_id);
if (($paypal = c_ws_plugin__s2member_paypal_utilities::paypal_api_response ($paypal)) && !$paypal["__error"])
$status = $paypal["STATUS"];
?>
* this code snippet requires s2Member Pro v1.5+Possible values for
$status are:
- Code: Select all
ActiveProfile
PendingProfile
CancelledProfile
SuspendedProfile
ExpiredProfile
Other details about the Recurring Profile are also available in the
$paypal array. The fields in this array are documented in the PayPal® Pro API guide, which is included with the latest version of s2Member Pro. Please check your account at s2Member.com for the
/s2m-pro-extras.zip file. Inside the zip you will find the API doc. Its file name is:
paypal-pro-api.pdf. In the PDF, you'll want to read the section on the Response Vars for "
GetRecurringPaymentsProfileDetails".
- Code: Select all
print_r($paypal); // spits out a full list of variables during testing.