3

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.

Ken
  • 77,016
  • 30
  • 84
  • 101
Phantom007
  • 2,079
  • 4
  • 25
  • 37
  • It should, right? I'd be pissed to find out the reservation is not mine *after paying* for it. Why did you tag this [tag:php] and [tag:mysql]? Are you looking for a specific php/mysql booking system example? – bfavaretto Jun 28 '12 at 03:19

4 Answers4

2

If you're using a synchronous connection to a payment gateway, then once the payment process is initiated, the reservation status should be change so something like 'Payment Pending'. If the payment gateway responds with a failure (or you have a timeout), you report it back to the user and it's up to you whether to extend the session time or not.

If you're using an asynchronous connection, like redirecting the user to a PayPal page and waiting for a response back, then you may want to consider an authorization instead of a payment: if the user is redirected back to your site after the session time limit has elapsed, cancel the authorization and notify the user that they took too long and will need to start over. If they're within their time limit, tell PayPal to finalize the transaction and make sure you get your money.

Hope that helps :)

Izazael
  • 171
  • 3
0

The system should let you pay for the booking, some warning should pop up. If you successfully payed for it, then you may have to present some ticket showing that you paid for it, so the company either refunds your payment or give you the room.

Every bit of that should be thought with anticipation, and that's the kind of work you should matter about, not the way you design the algorithm.

Think about it, what happend if you exceed the deadline to deliver some work.

Damian Rojas
  • 35
  • 1
  • 9
0

Your sales algorithm has to have some intelligence. Like a Salesman trying to close a deal.

He'll know it's an old lady and it might take a while, but when she's made up her mind she'll pull through with full payment.

Or He's a cranky old man who will always say the cheque's in the post.

Computers can only take the best guess without meeting or understanding.

So your best guess will based upon past responses and allowing appropriate timeouts. e.g. monitoring avearge input times for forms on your site. An old man might be simulated bz a slow internet connection.

Loopo
  • 2,204
  • 2
  • 28
  • 45
0

well with paypal you can do a payment authorize.. This will put the money on hold from the customers paypal account.

After the aothrization it will then be sent back to your system with a transaction id You can then check if the reservation has timed out yet or not.

If so you can notify the user that it has timed out and that they have not been charged. You then void the transaction with the transaction id to release their funds

If it hasn't timed out, you can then capture the funds.

https://cms.paypal.com/us/cgi-bin/?cmd=_render-content&content_ID=developer/e_howto_html_authcapture

Kris
  • 6,094
  • 2
  • 31
  • 46