Tracking returns from PayPal
Posted 27 November 2002 - 04:30 AM
Another question This time about tracking which payment is for which basket.
I'm implementing my own basket/cart on my site and using PayPal to take the payment. So I calculate the amount of the purchase and send the Customer to PayPal to pay for it.
However one thing that occurs to me is that I would need to save the "state in time" of the items in the basket and generate a unique ID for that basket and pass it to PayPal, then capture it in the return URL to log which basket has just been paid for.
The reason being (playing Devil's advocate!) would it be possible for the following:
1. Customer adds one item to basket, goes to checkout, confirms details, and clicks link to pay to go to PayPal, but opens it in a new window. The ID of the basket is passed to PayPal.
2. Customer adds more items to their basket in the original window.
3. Customer pays at Paypal and returns to the site.
4. The site picks up the Basket ID and confirms the order to the Customer.
However - they've paid for one item but the site has logged payment for that basket so they have effectively got all the other items for free.
Hope this makes sense; I'm assuming I need a duplicate set of tables in my DB to "copy" the state of the basket and generate a separate unique ID and use this to track the payment, so when the Customer returns, the order that gets placed ONLY contains what was in the baske *at the time* they went to pay for it.
Does this sound accurate?
Posted 28 November 2002 - 10:13 AM
Am I missing something here?
Posted 28 November 2002 - 07:41 PM
If you are not sending the cart contents to PayPal then you can use a pass-through variable such as "item_number" or "invoice" to pass in an order ID that will be echoed back to you.
Dev Net: https://www.paypal.com/pdn
0 user(s) are reading this topic
0 members, 0 guests, 0 anonymous users