September 26, 200818 yr Hi all, Ok so I have set up a paypal IPN script, and linked paypal to it etc... there is only 1 minor problem - I need to know which user it is purchasing the item - and as its paypal (and not the user) that is redirected to the IPN page, there is no session open to determine the users "UserID". How do I get this information across? Or even better is there a way to send the user to the IPN page after they have purchased an item so that the IPN script is run in the users browser (giving access to session). Please help meee!! Driving me mad. Regards, Nathan Webb
September 26, 200818 yr Hi all, Ok so I have set up a paypal IPN script, and linked paypal to it etc... there is only 1 minor problem - I need to know which user it is purchasing the item - and as its paypal (and not the user) that is redirected to the IPN page, there is no session open to determine the users "UserID". How do I get this information across? Or even better is there a way to send the user to the IPN page after they have purchased an item so that the IPN script is run in the users browser (giving access to session). Please help meee!! Driving me mad. Regards, Nathan Webb Hi i created in the registereation form the users paypal account if it was left blank they could update it from an accounts page at another time,when a user logs in a session for the user and the paypal email address is set hope this helps
September 26, 200818 yr Author sorry elite but does not really explain what I'm trying to do? I know I could get the user to enter their paypal e-mail address -i.e. bind their address to their account, but no other sites have to do it so I shouldn't need to either? There must be a way to send the userID to paypal when they make payment, and get it to return the value?
September 28, 200818 yr <input type="hidden" name="custom" value="<?php echo $userID; ?>" /> PayPal will return this value when it sends the data to your IPN handler. (You would probably want a paymentID rather than a userID as users may attempt more than one payment). Create a table for payments and write the details including userID in that table, send the ID of the payment in the custom field to PayPal, when the IPN is received and validated read the record from the payment table (which includes userID) and then update the payment table with the status. This way you can store any data your want in the payment table before the payment is made, and then read it back on successful IPN.
Create an account or sign in to comment