In general, i'am looking for a way to determine "who paid for what" when I get a Paypal payment.
I'm developing a e-commerce website and am trying paypal as the payment method. However, i'm confused about how to associate the response (IPN message from paypal, which i currently intend to rely on solely) with a specific transaction happening on my site.
What i expected was that maybe when customer click on my paypal button to pay, i could tell paypal "hi, this is a transaction with id 1234"; then paypal could tell me "transaction 1234 is completed\canceled". However, i didn't find some "stamp" that i can put on a transaction so that i can know who paid for what. The txn_id variable seem to be close to what i expected, but as i understand now, it's generated by paypal instead of assigned by me.
I also thought about doing some tricks on the redirect_url I send to paypal. May be I could generate a url for each transaction, send that url as a code to paypal; so that when someone requests that url I know the transaction is paid for as only paypal and i know the existence of that url. However, i'm not sure about the security about this method, and think there may be other ways.
Thanks in advance for any idea or direction!