Reputation: 1950
When using Paypal Standard Payments what is the best way to tie a customer to an order before payment? When the customer clicks 'checkout' the site will store information about the order in the database with a status of 'pending' and then send the user to Paypal to complete their purchase. After purchase I plan on using IPN to verify the payment and store customer shipping info in a separate table. How should I tie the original order information to the shipping info? I could ask the user for their Paypal email address before sending them to Paypal and store that alongside the order information but maybe there is a better way?
Upvotes: 1
Views: 899
Reputation: 737
With PayPal's Website Payments Standard, you can send the identifier for your pending order (header) as the CUSTOM variable in your form. PayPal will return it to you in the IPN message. See https://www.x.com/developers/paypal/documentation-tools/ipn/integration-guide/IPNandPDTVariables Table 2 for other items that can arrive in the IPN message.
Upvotes: 2