Forum Moderators: open
If you mean to put whole payment process in pop-up, thats ok in case that user don't touch F5 or backspace key :)
tnx for answers, but I want to be totally sure that card has been charged once and I'm going to spend little time now to track values (as I mention above)
<input type="submit" name="submitButton" onClick="checkForm(this.form); return false;" value="submit order">
(javascript)
function checkForm(form) {
... do your checks ...
form.submitButton.disabled = true;
form.submit();
}
That stops the double-click habit.
Now when an order is placed, set a unique SESSION cookie. Prior to that in the programming, you will have already checked to see if the cookie exists. Use a session cookie so it doesn't kill any subsequent orders.
$orderPlaced = &checkForCookie;
if ($orderPlaced) { &thanks_but_you_have_submitted_already; }
else { &set_cookie_and_place_order; }
The cookie can be anything, really - a unique number, or something like "my_company_order=1" since you can only set/read a cookie on the same server. You're going to use it once and never need it again.
Of course for this to work it makes it Javascript and cookie-dependent, but if you can reduce half the double-orders, it's better than what you had before. In my experience it usually makes 100% of them go away - users who are careless when placing an order also don't know how to disable Javascript and cookies either, so it's all good. :-)
I will not have any problem with cookies & JScript until we lunch new site because I currently need this on Intranet only, for Call center department where lot of part-time employees work.
BTW I saw that most of the shops/sites are not using autocomplete="off" property for credit card number field? Does anyone know why?