I am working on payment page of my website but cannot figure out at which process to store customer's details before sending them to PayPal payment page. Here's the process:
- Choose Product page
- Fill in customer details page
- Cart confirmation page
PayPal official site payment page
- redirect back to my site
- Login to their account
Fill in some form
if not success (cancelled/denied/etc)
redirect back to my site to meet cancellation page.
What is the best approach for this circumstance as I would want to store only the successful transaction, customer who actually did make a payment but that has to be after I received the IPN code from PayPal. Will I lost their customer data on the way if I decide the store their details in the database after they are redirected back to my website?
If I choose to store customer data at stage 3 in the temp table, I guess I would have had a long list of unsuccessful records in the temp table and I have to update back and forth in multiple tables for this approach. What would you recommend?