How can I know which user paid (via paypal) for my service using php?
I have a table in my database named users,containing the following rows:
ID, Username, email, IP, password
If the user have a different paypal email than the email he made a registration at my website, how can I know that he paid me and not someone else?
I haven’t used Paypal payments for a while, but when you send the checkout details to Paypal I seem to remember you send a transaction ID (txn_id) or something similar, you just need to store that transaction ID next to the user in your database, when PayPal return the ‘success’ payment with the transaction ID, you know which user it was that paid.
You haven’t said what method you’re using to collect payments, but again I seem to remember Paypal’s IPN (Instant Payment Notification) service is a good place to start;
Here’s a link to some info on: Paypal’s IPN service
And also some: code samples on how to integrate IPN