#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2004
    Location
    Marbella, Spain
    Posts
    381
    Rep Power
    0

    Delete booking if leaving page without purchasing


    Hi,
    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?
    Thanks
  2. #2
  3. For POny!
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2012
    Location
    Amsterdam
    Posts
    416
    Rep Power
    115
    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
  4. #3
  5. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Sep 2004
    Location
    Marbella, Spain
    Posts
    381
    Rep Power
    0
    Originally Posted by aeternus
    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
    Thanks,
    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.

IMN logo majestic logo threadwatch logo seochat tools logo