|
Posted by David Aldred on 11/14/07 20:28
I'm looking for a bit of input on how a particular situation is best handled
on a small ecommerce site.
The issue here is how to avoid two people buying the same time period for a
holiday cottage, while at the same time not locking everything up while
people fail to pay! Payment is to be handled off-site via Paypal.
Say Person A wants the cottage from 21/3/08 to 28/3/08, and so does Person
B. The easy bit is to arrange that when Person A clicks the 'pay for it
now' button, a flag is set in the relevant record on the database so that
if person B now tries to initiate payment, he is informed the week has been
provisionally booked pending completion of payment - the script re-checks
availability before actually initiating the jump to the payment processor.
If we get back a 'cancelled' response from Paypal, we can remove the flag;
if we get a payment confirmation the flag changes to 'definitely booked.
No problem.
But what if Person A gets to the payment screens, decides to change his
mind, and simply closes his browser? Or, come to that, what if his PC
crashes out? No response, either way, will be returned to the site from
Paypal; so the flag stays on and the cottage is provisionally booked for
ever......
The only way I can immediately see here is to put a time limit on the
payment process - if we haven't a completed response from the payment
processor within (say) 20 minutes, the cottage is back to 'available'
status. Obviously this runs the risk of Person A completing the payment
20.5 minutes later, and so having made the payment but not getting the
booking. As long as it's clear enough how long they've got, though (with
a bit of margin built in) that's probably OK - refunds just have to be
made.
However, I'm wondering if this is the right way. I've used such sites as a
customer many times, and can't recall ever seeing anything which said 'you
must complete payment within x minutes' - of course, they may be using an
unadvertised timeout (presumably fairly long) - but perhaps there's a
better way I haven't thought of??
Any advice gratefully received....
--
David Aldred
Navigation:
[Reply to this message]
|