Page 1 of 1
How to tie paypal payment to user accounts? IPN?
Posted: Thu Dec 31, 2009 11:08 pm
by phpshift
I need to see WHO made a payment using the paypal IPN, I suppose. But I don't know how to get which user, just payment details. Is there any way to send the username to paypal when they press the buy now button and then get it back with the IPN?
Re: How to tie paypal payment to user accounts? IPN?
Posted: Fri Jan 01, 2010 12:26 am
by requinix
You can send whatever you want in the "custom" field and it'll be returned to you verbatim.
(Actually, any unspecified fields will be returned to you, but it's hazardous to forwards compatibility to rely on that.)
Re: How to tie paypal payment to user accounts? IPN?
Posted: Fri Jan 01, 2010 5:38 pm
by califdon
As tasairis said, you can send any data you want along with the transaction, in the "custom" field, and it will be included in the IPN confirmation data. There are additional possibilities, but you should read the complete documentation at
https://cms.paypal.com/us/cgi-bin/?&cmd ... TVariables. I know it's a lot of detail, but if you're building a financial payment system, you really need to understand how it works!
Re: How to tie paypal payment to user accounts? IPN?
Posted: Wed Jan 06, 2010 12:50 am
by nga
uhm, the custom field in IPN can be used to hold userID but where can i put this cutome field so it would come back in IPN? In paypal form as a hidden field?
Re: How to tie paypal payment to user accounts? IPN?
Posted: Wed Jan 06, 2010 12:17 pm
by califdon
nga wrote:uhm, the custom field in IPN can be used to hold userID but where can i put this cutome field so it would come back in IPN? In paypal form as a hidden field?
Yes, a hidden field with the name='custom'.
Re: How to tie paypal payment to user accounts? IPN?
Posted: Mon Apr 26, 2010 3:02 am
by phpshift
This is invaluable. Thank you for your help. I could not find an option to add a "custom" field from paypal itself. It never occurred to me that it would allow me to just add it myself. Thanks again.