Integrating With Authorize.net Using SIM
By Will Bontrager2003-02-11
Using JavaScript To Insert the Fingerprint
Note: Using JavaScript code in the context presented in this
section might be less secure than the methods described
in the "Modifying Scripts To Create the Fingerprint"
and "Detailed Instructions For Master Form" sections,
below. I don't know this for a fact, but it seems to me
that providing a URL to obtain the fingerprint for a
specific order amount could be a security consideration.
If you know the total amount of the transaction at the time the order verification form is to be displayed to your customer, you might use JavaScript to insert the fingerprint.
For example, if the order total amount is $24.95 you might put the following your order verification form's source code where hidden fields are appropriate:
<script language="JavaScript" src="/cgi-bin/SIM.cgi?24.95">
</script>
Notice that the url to SIM.cgi is followed by a question mark and then the total amount of the order.
If you want to specify a currency type along with the order amount, append an ampersand and the currency type to the URL. Example:
<script language="JavaScript" src="/cgi-bin/SIM.cgi?24.95&USD">
</script>
When using SIM.cgi to insert the fingerprint hidden fields with JavaScript, answer Yes to the question in the customization section of the script where it asks whether or not you're calling the script as an external JavaScript file.
An example order verification form using JavaScript to insert the fingerprint is included in SIM.zip as file SIMexample_JS.shtml
Tutorial Pages:
» Integrating With Authorize.net Using SIM
» How SIM Works
» The Order Verification Form
» Customizing the SIM.cgi Script
» Using SSI To Insert the Fingerprint
» Using JavaScript To Insert the Fingerprint
» Using a Perl Program To Display the Form With Fingerprint Automatically Inserted
» Modifying Scripts To Create the Fingerprint
» Detailed Instructions For Master Form
» The Order Verification Form Modification Step
» Uploading the Three Files To Your Server
» Testing
» Changing Transaction Keys
Copyright 2004 Bontrager Connection, LLC
| Related Tutorials: » Random subroutines in Perl » Log Script Use » Creating Perl Modules for Web Sites » Bit Vector, Using Perl Vec » Build a Perl/CGI Voting System » Perl Range Operator |
