View Full Version : Advice Needed


drgmobile
02-25-2005, 04:01 AM
Ok here goes, this is how it is at the moment -

A customer completes my order form and submits. The variables from the form are held in a PHP Session until PayPal passes the customer back to a page where the PHP Session variables are retrieved and acted upon.

This is what I want it to do -

Customer completes my order form and submits. The variables from the form are held in a PHP Session. Customer pays via PayPal and is passed back to a page where the PHP Session variables are retieved and acted upon ONLY if the PayPal payment is verified as Valid by PayPal Assistant IPN.

Any ideas how I would achieve this? :uhoh:

Jafo
02-25-2005, 01:34 PM
Well, there will be a bit of lagtime between when the customer makes a purchase and when Paypal notifies the script. Usually no more than a minute. If you pass the Session ID through Paypal, say as a custom form variable, you could then write code in the code box of the action to record that variable into a database somehwere. Then some other code could verify if that session ID exists in the database.

You should understand that sessions are very temporary and will change if say the user closes their browser. You may want to consider backing it up with a cookie.