Alex Rivera | Logout

Dealing with two people buying a unique item in an online shop at the same time

Asked 2010-02-18T12:50:45.020
10

I'm creating a simple online shop with PHP integrated with PayPal that sells unique items. What I'm wondering is how other shops deal with multiple people attempting to go through the payment process with the same item.

This is my current draft strategy:

  • Items have three status types: available, on hold & sold.
  • As a user moves to the PayPal payment page it checks the status of all the items in the cart to ensure they're available. It also sets the item's status to "on hold" until they either come back after payment is confirmed or it times out (10 minutes? Not sure what this should be).

Is this standard practice or is there a more practical way I should be going about this?

Thanks in advance!

Edit
Report

1 Answer

0

woot.com is notorious for this problem but their solution works well. After payment information is verified the user is brought to a page with a small amount of text saying something like "your order is in, we are verifying inventory".

It looks like the paypal API has a "RefundTransaction" message so something like that might not be possible. But the user experience could be awkward if your going to the paypal website then coming back to your site.

answered 2010-02-18T13:10:57.560

Your Answer