I have a feature on my website which I want to enable after user pays for it. I am using Paypal buy now button and Instant Payment Notification. When user clicks on buy now button, user is taken to paypal website to pay and by IPN asynchronous call is received by my j开发者_运维百科sp file when transaction is complete. My question is how can I keep track which user has paid if the user uses different email ids while subscribing on my website and while paying on paypal website.
Use the "custom" parameter. You can send this along in the initial request to PayPal, and it will be returned to you along with all other data in the IPN POST from PayPal.
For Website Payments Standard, use:
<input type="hidden" name="custom" value="your custom data here">
For Express Checkout or Website Payments Pro, use:
CUSTOM=xxxxxxxxx
It will be returned as "CUSTOM=xxxxxxxxx" in the IPN POST data.
精彩评论