December 8th, 2012, 05:47 AM
Delete booking if leaving page without purchasing
I am doing an online booking with payment paypal.
The choises I have is to first insert the booking, then send the id to paypal and verify if paid, if not paid I would delete that id from the database.
Or I could better only calculate, send all the vars to paypal and if paid insert the booking, however not sure if that is possible as there would be many vars to send to paypal.
If I choose option one, to insert the booking before payment and then delete if not sucessfully paid, I will have a problem I cant think of any idea how to solve.
What if somebody click on buy now button, go to paypal however they just close the window or navegate to another page or site, then how cand I delete the booking I just inserted?
Any ideas and/or recomendations?
Also if I have to do the booking before payment, any good captcha to make sure its not a robot filling in the bookingform?
December 8th, 2012, 07:54 AM
maybe store the variables in a session, and on success insert them in the database. Deleting them when not paid, doesn't seem right to me
December 8th, 2012, 08:06 AM
Originally Posted by aeternus
The problem is that I have availability on-line, so if I insert a booking in table bookins that property is blocked as unavailable, so the booking must be deleted. I can have a second table just for storing.
The problem is not if paid, I get succesful and unsuccesful from paypal. The problem is if the person leave paypals page without finishing the purchase.