Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ecommerce stock management with external payment gateway

Tags:

People also ask

Which type of e-commerce is payment gateway?

Payment Gateway is an online payment processing technology which helps businesses to accept credit cards and electronic checks. In other words, payment gateways are “Manin-the-middle” which are located between e-commerce platforms and clients.

Is PayPal a payment gateway?

The PayPal Commerce Platform gives you a payment gateway and payment processor all in one, making it simple to start selling. There are no set-up or monthly fees for PayPal Commerce Platform.


this question is similar to this one but with a twist (so the answer accepted for the older question is not valid in the following scenario)

i have a site for selling tickets (PHP/MYSQL). Suppose i have just one ticket left:

  • buyer A puts the ticket in her cart and goes to the payment gateway page (ie. paypal)
  • the ticket is locked for 5 minutes, so buyer B cannot buy it
  • buyer A waits 5 minutes with the paypal page open, doing nothing
  • the ticket is unlocked so buyer B puts it in his cart and goes the the paypal page
  • buyer A executes the payment procedure on paypal with success
  • buyer B executes the payment procedure on paypal with success

i can wait longer but i don't think this will solve the issue in the more general case. moreover, if i do that, it will be possibile to make some kind of DoS, locking the items in stock for large periods of time.

what's the best way to handle this scenario ?