Stop Double Clicks - Client side solution
Using the eWAY XML solution the payment page is located on your server in a secure SSL directory. To prevent users from double clicking the "Process Payment" button on your site and then being billed twice, the following JavaScript code should be implemented.
This code only allows a form to be submitted once, if submitted again a dialog is displayed and no further action is taken. This code is provided FREE of charge by eWAY, and can only be used by eWAY merchants linking to eWAY.
<head> <title>payment page</title> <script language="JavaScript" type="text/javascript" > <! function checkFields(){ if (submitcount == 0) { submitcount ++; return true; } else { alert("Transaction is in progress."); return false; } } </script> </head>
<form name="TXNDETAILS" ACTION="payment.asp" METHOD="post" onSubmit="return checkFields()" > <input type="submit" value="Process Transaction using eWAY" name="submit22" /> </form>
<table> <tr> <td align=center> <font face="Arial, Helvetica, sans-serif" size="1" color=" <a href="../login/default.aspx" class="footertextlink">Login</a> <font color=" <a href="../ssl/ssl.aspx" class="footertextlink">ssl certs</a> <font color=" <a href="../services/default.aspx" class="footertextlink">Services</a> <font color=" <font color=" <font color=" <font color=" <font color=" <font color=" <font color=" <font color=" <font color=" <font color=" <span class="footertext">Web Active Corporation Pty Ltd ACN 086 209 403 - Copyright 1998 - 2006 - ABN 32 086 209 403</span> </font> </td> <td> <a href="../about/privacy.asp"> <img border="0" src="../images/truste/finalmark.gif" width="116" height="31" /></a> </td> </tr> </table>
|