470,596 Members | 1,108 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 470,596 developers. It's quick & easy.

Help with redirecting please

Firstly, many thanks to those who replied to my dreaded what if question. As a
result I have now been able to partially resolve my problem as follows:
step 1 - User clicks on "buy me" button
step 2 - He is sent to a confirmation page to confirm purchase or cancel
step 3 - Confirmation page first checks the pending transaction table and
deletes all records that are older than 20mins.
step 4 - Confirmation page then checks the pending transaction table again to
see if the item that the person wants to buy remains in the table. If the answer
is yes then the buyer is blocked from purchasing. If the answer is no then the
buyer may proceed with purchase. If he clicks on the confirm button he is then
sent to Paypal site to make his payment.

The above prevents 2 people from trying to buy the same item within a 20 min
period. However, it is still not foolproof.
Buyer 1 arrives at confirmation page and decides to go and make coffee. After 19
minutes he returns to complete his payment via paypal. While he is making
payment buyer 2 tries to buy same product and can do so because 20 mins has

So I need to execute some final php code before sending the payment to paypal
for processing but I don't want to do it via another form. I have added another
field in the pending transactions table called status and heres what I want to

step 1 - User clicks on confirm purchase to make payment and is sent to a
redirect page.
step 2 - Redirect page checks to see if more than 20mins has elapsed. If the
answer is yes then display a timeout page. If the answer is no then
update the status in the pending transaction table to "confirmed" and send the
variables held within $_POST to paypal but NOT by using a form.

Updating the tables is not a problem for me, it is the redirecting that i'm not
sure about. Any help greatly appreciated.


May 30 '06 #1
0 1105

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by nagaraj | last post: by
5 posts views Thread by PaulThomas | last post: by
15 posts views Thread by Matt Burland | last post: by
22 posts views Thread by Jeff Louie | last post: by
41 posts views Thread by amygdala | last post: by
9 posts views Thread by Jonathan Wood | last post: by
4 posts views Thread by damiensawyer | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.