How to get Profile ID in paypal via API

南楼画角 提交于 2019-12-11 18:05:34

问题


I'm doing some paypal integration in my application and bumped in on cancelling a RecurringPayments. To cancel a Recurring Payment, I need a Profile ID, I do not know where to get the Profile ID, can someone guide me here.

Your help would be greatly appreciated and rewarded!

Thanks! :)


回答1:


Use PayPal API's 'GetTransactionDetails' method to get the details related to a particular transaction.

You have to pass the TransactionID as the parameter along with your request. And it will respond back with all the details(which includes the SubscriptionID/ProfileID as well) related to that transaction.

Follow this link: https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_api_nvp_r_GetTransactionDetails

Hope it helps you.

Thank you.




回答2:


I will be talking about Paypal API for Express Checkout here, and not Direct Payment.

When you charge subscription payment from customer you need to use Paypal API on 2 counts.

  1. First use SetExpressCheckout and get the token sent by paypal.
  2. Then use CreateRecurringPaymentsProfile and get the authorization from the user for starting of the subscription. Along with this request you will also be sending the Token you got, Profile Start Date, Billing Period and Frequency. Once the user confirm, he is sent back to the site with a response array from paypal.

I am sure you have followed the above steps.

In that response, you will see Profile Id of the user. You have to save it somewhere such as database table corresponding to the user in concern.

Finally, when cancelling the subscription you have to pass the profile id and call ManageRecurringPaymentsProfileStatus.

Follow this nice tutorial: http://thereforei.am/2012/07/03/cancelling-subscriptions-created-with-paypal-standard-via-the-express-checkout-api/




回答3:


You can also find the Profile-ID without making an API call. You can find it in your PayPal account.

Login to your PayPal account. Go to 'My Account' tab -> Overview There you will find the list of transactions in 'My recent activity' section.

Identify the Recurring-Payments (Recurring Payments can be identified from their type) Click on 'Details' for any Recurring transaction. You will be directed to a different page(Transaction Details). Check out the URL of this page. You can get the Profile-ID from there. OR Click on 'View details' when you are in the 'Transaction Details' page You can find the Profile-ID over there

Thank you.

Regards, Anish



来源:https://stackoverflow.com/questions/10714730/how-to-get-profile-id-in-paypal-via-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!