php - Model cart locking with Paypal -


I am currently implementing PayPal Express checkout within a Zend Framework application, I've written my own cart model Includes two simple classes: Cart & amp; CartItem, and they are capable of volume, get total value, etc.

I do not have any information about payment system, and I only use PayPal (this is my first time), but I am still in PayPal (what's in PayPal) Is not able to control it, at the beginning of the process (when redirecting PayPal) it is a good idea to "lock" the car, inconsistency on the existing order processed by PayPal and actual cart To avoid on the website.

This may be for example, that the user opens a new tab and attempts to add products during the payment process with PayPal.

If your car is locked then it is not able to use it

My question do you think this is a good way?

Edit : Due to the fact that I do not store anything in the database, but the shopping cart in the session is all orders to be submitted only with PayPal, It does not want to be stored, it's really easy.

I think your attitude is fine. But make sure you inform users why they can not add items to the cart and provide an easy choice to unlock the carts.

Use the case:

  • Fill the cart
  • Start the payment
  • Ah, I forgot the socks
  • Close the paid tab
  • The store opened in another tab
  • Add socks
  • "You can not add, it's locked" < Li> I can not return the payment to cancel it and can not add anything to the car = & gt; I leave

Comments