Integrating With Authorize.net Using SIM
By Will Bontrager2003-02-11
Detailed Instructions For Master Form
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.
Copyright 2004 Bontrager Connection, LLC
|
|||||||||
You might also want to check these out:
|
Leave a Comment on "Integrating With Authorize.net Using SIM"
You must be logged in to post a comment.
Link to This Tutorial Page!

