My application comprises of a subscription service. I have implemented the section using Paypal standard. What i did to make a recurring a recurring profile is to do a SetExpressChekout call initially and then with the response token, i redirect the browser to Paypal and there he could login to Paypal and accept the terms and condition for the payment and then the browser will be redirect back to the url i specified as the return url with token as the query string. With this token i make a doexpresscheckout api call and then convert the transaction to a recurring profile, the profile id, transaction id will be stored in database for refund transaction, recurring profile cancellation etc. And also this profile id is needed in IPN which logs further recurring payment transaction in my database successfully. Everything works fine in this environment.

Now my customer needs to have credit card transaction along with Paypal transaction. For that he has sign up for enhanced recurring payment. I have created a subscription button with item name amount currency success and cancel url and generated the html for the hosted buton and pasted it in my form. On clicking the button the browser gets redirected to paypal and i could pay with both paypal and credit card. Once the payment is completed and i am redirecting back to success url. but my success url query sting only contains auth parameter. I am getting no idea on how to use this parameter to get the details of the recurring payment like profile id and transaction id to log to my database. If it is received only via IPN how could i know whether the profile id belongs to which user.

Thanks and regards

有帮助吗?

解决方案

With Website Payments Standard you can set the custom parameter to contain specific data about the user.
For example;

<input type="hidden" name="custom" value="hashedStringofUserID">

This data will subsequently be returned in the IPN POST payload's custom key.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top