Validating user purchase via IPN?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Here is my setup:
- A user logs into their account on my site
- The user clicks the "Buy Now"
- The user completes the purchase, IPN is sent
- My server validates the IPN successfully.
This works perfectly except I have no way of marking my user's account as payed. My IPN script is without access to the user's session cookie, which is making it difficult to mark the user's account as payed. Is there anyway I can mark my users account as payed via the IPN message?
Thanks in advance...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Set a custom field in the buy now button form that would be associated with the user so you can check it against the database.
If the user id is 34, do this:
<form input="hidden" name="custom" value="34" />
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The solution below is correct for passing the user id information. Or you could pass any variable, like the session id in your case. As long as you are storing the SID for this customer on your site, you can add a snippet to your IPN return page that checks for payment_success statement. If it exists, you can update the users data to show that they have paid.
What programming language are you using?

Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
- Multple payment receivers in Merchant services (Archive)
- user authentication failed in Merchant services (Archive)
- Payflow link in Merchant services (Archive)
- is digital goods confirmation screen mandatory? in Merchant services (Archive)
- Confusion over recurring payment sequence in Merchant services (Archive)