I'm having an issue with some duplicate orders on my website, and I'm able to reproduce it by clicking on the submit button more than once to complete the checkout on my site.
As such, I'm trying to disable the button once you've submitted it so you can't process duplicate orders by being impatient.
If you go here: http://sandbox.usbswiper.com/usbswiper-usb-magnetic-stripe-credit-card-reader.html
Just add that to the cart and go through a CC checkout. It'll actually fill everything in for you so it's really quick. Just check that shipping is the same as billing and you won't have to type anything.
When you to the checkout-review.php page, this is where the problem is. There's a big COMPLETE PAYMENT button that can be submitted multiple times.
I've attached the short jQuery that I'm using to try and solve this problem. It doesn't seem to be working, though, because I can still submit duplicate orders.
Any information on how to make this work would be greatly appreciated. Thanks!
$('input[type=submit]', this).attr('disabled', 'disabled');