Helping ordinary people create extraordinary websites!
HOME TUTORIALS SCRIPTS WEB HOSTING BLOG FORUM
Get Our Newsletter
Email:

Integrating With Authorize.net Using SIM

By Will Bontrager
2003-02-11


Detailed Instructions For Master Form

Integrating SIM using Master Form requires two MasterForm.cgi script modification steps, one order verification form modification, and three files will need to be uploaded to your server:

Script Modification Step 1 --

At about line 38 or line 63 of MasterForm.cgi (depending on which version of Master Form you're working with), you'll find this line:

&GetDateTime;

Immediately above that line, insert these two lines (can be all one line, if you prefer):

$In{SIMFIELDS} =
GenerateSIMhiddenFields($In{ordertotal},$In{currency});

You'll end up with:

$In{SIMFIELDS} =
GenerateSIMhiddenFields($In{ordertotal},$In{currency});
&GetDateTime;

The "ordertotal" part of the line is the form field name that sent the order total amount to Master Form. If that field in your form has a different name, change ordertotal to the field name your form uses.

The "currency" part of the line is the form field name that sent the currency code to Master Form. Note that this is optional --

~~ If your form does send that information to Master
Form and that field in your form has a different
name, change currency to the field name on your
form.

~~ If your form does not send that information to
Master Form, remove the ",$In{currency}" part of
that line, which will make it look like this:

$In{SIMFIELDS} =
GenerateSIMhiddenFields($In{ordertotal});
&GetDateTime;


Script Modification Step 2 --

SIM.zip has a file named subroutine.cgi, which contains a subroutine named GenerateSIMhiddenFields.

Copy subroutine GenerateSIMhiddenFields and paste it all the way at the bottom of the Master Form script. It could actually go anywhere below the first line of the script, so long as it isn't inserted into conditionals, loops, or other subroutines. But putting it at the bottom of the file is probably the best place because you don't have to worry about interferring with other sections of the script.

The subroutine GenerateSIMhiddenFields has three places requiring custom information. See the "Using a Perl Program To Display the Form With Fingerprint Automatically Inserted" section, above, for customization information.

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


 | Bookmark
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

Ask A Question
characters left.