GetRecurringPaymentsProfileDetails issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I called this function with valid parameters.
function get_subscription_status( $profile_id, $api_username, $api_password, $api_signature) {
$api_request = 'USER=' . $api_username
. '&PWD=' . $api_password
. '&SIGNATURE=' . $api_signature
. '&VERSION=108'
. '&METHOD=GetRecurringPaymentsProfileDetails'
. '&PROFILEID=' . $profile_id;
$ch = curl_init();
//curl_setopt( $ch, CURLOPT_URL, 'https://api-3t.paypal.com/nvp' ); // For live transactions
curl_setopt( $ch, CURLOPT_URL, 'https://api-3t.sandbox.paypal.com/nvp' ); // For sandbox transactions
curl_setopt( $ch, CURLOPT_VERBOSE, 1 );
// Uncomment these to turn off server and peer verification
//curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, FALSE );
//curl_setopt( $ch, CURLOPT_SSL_VERIFYHOST, FALSE );
curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
curl_setopt( $ch, CURLOPT_POST, 1 );
curl_setopt( $ch, CURLOPT_POSTFIELDS, $api_request );
// Request response from PayPal
$response = curl_exec($ch);
// If no response was received from PayPal there is no point parsing the response
if( ! $response )
die( 'Calling PayPal to change_subscription_status failed: ' . curl_error( $ch ) . '(' . curl_errno( $ch ) . ')' );
curl_close( $ch );
$res = urldecode($response);
print_r($res);
}
When I called this function, I received below response.
PROFILEID=I-S43P3DWW5C2C&TIMESTAMP=2018-10-19T17:36:52Z&CORRELATIONID=a094a4da324df&ACK=Failure&VERSION=108&BUILD=46457558&L_ERRORCODE0=11592&L_SHORTMESSAGE0=Subscription Profiles not supported.&L_LONGMESSAGE0=Subscription Profiles not supported by Recurring Payment APIs.&L_SEVERITYCODE0=Error
I'd like to check the subscription status (in order to see active or not), so I used this function to get the Recurring Payments Profile Details according to this guid:
https://developer.paypal.com/docs/classic/api/merchant/GetRecurringPaymentsProfileDetails_API_Operat...
But I failed and got above error response.
How can I solve this?
Please help me.
Thank you.
Li Hanying.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Unfortunately, you're running into a problem I've seen a lot of that has resulted in changes PayPal made with their terminology. I will try to explain without this turning into too long of a post.
Payments Standard
This is the product PayPal provides where you can create simple HTML buttons. This includes Buy Now, Donate, Subscribe, etc. When you create a Subscribe button this way, that used to be called "Standard Subscriptions."
Express Checkout + Recurring Payments
A more advanced integration is when you use the Express Checkout and Recurring Payments APIs. This allows you to build subscription profiles using API calls, and then you'll also have access to pull details like you're trying to do here.
The Change in Terminology
Not long ago, PayPal started calling all of this "Recurring Payments". The problem is that "Standard Subscriptions" are not compatible with APIs like you're trying to use. Only actual "Recurring Payments Profiles" are.
It used to be difficult enough to get people to understand this, and now it's even harder since they're calling two different products the same thing. They are very different, and you simply cannot use the APIs to pull details about a "Standard" profile.
If you want to use the APIs to pull details you'll need to build your profiles using the APIs as well.
PayPal Partner and Certified Developer - Kudos are Greatly Appreciated!
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Connecting with site to take payments in Payflow
- Change the button from Sandbox to Production in REST APIs
- Mandatory Account Creation Hindering Customer Experience in REST APIs
- Issue with Rendering Trustly Payment Button via PayPal JavaScript SDK in SDKs
- PayPal Express Checkout charging incorrect values? in Sandbox Environment