Hi Experts!

I have a question and will be grateful if you can help me out with some ideas.

In an online hotel or ticket booking reservation system, normally a user is allocated a specific time to complete their registration / payments etc and during that time the system holds the reservation for that user. If the user is unable to finish their registration during that time the system times out and the user is not allowed to proceed any further. The system unholds the reservation for other users.

My question is, if a user is taken to the payment gateway system (paypal etc) and they spend all of the allocated/hold time on the payment page, and after making a successful payment they return back to the site, will the system still allow them to complete the booking even though the user ran out of his allocated time?

How does this work in a typical booking system?

Many thanks in advance.

The best way to handle this is by processing the payment on your website directly.

If you have to use an external payment gateway, the best way to handle that would be to create the reservation before sending them to the payment gateway. After they complete the payment, using a feature like Paypal's IPN (instant payment notification), you would mark the reservation as paid and the transaction would be over. If they don't make the payment, you could setup a cron job to remove all reservations that are 30 minutes old for example and haven't been paid.

In this setup, time wouldn't matter. You have to collect all the required information before sending them to the payment gateway. With paypal, for example, this is kind of a necessity because once you they return to your site their session might not be the same and they wouldn't be able to continue on with registration anyway (made this mistake once). There are ways to make that happen, but they are not that fun to implement from what I have seen/can think of.

Hopefully that made sense.

There might be other ways that are better, but thats how I would do it.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.