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


Modifying Scripts To Create the Fingerprint

Scripts can be modified to create a SIM fingerprint. How the fingerprint would then be used depends on the script. An example of a script modified to create and use the SIM fingerprint is in the "Detailed Instructions For Master Form" section, below.

To create a SIM fingerprint, two things need to be done with the script:

1. The subroutine GenerateSIMhiddenFields (found in
subroutine.cgi, in SIM.zip) needs to be inserted
into your script.

(See the "Using a Perl Program To Display the Form
With Fingerprint Automatically Inserted" section,
above, for information on how to customize
subroutine GenerateSIMhiddenFields)

The subroutine should not be inserted within any
other program blocks, such as subroutines,
conditionals, or loops. One place it might be done
is immediately below the first line of the script.
Another place might be at the bottom of the script,
so long as the script doesn't have this line

__END__

anywhere within it. If it does have that line, the
subroutine may be inserted immediately above it.

Not knowing the script you're modifying, I can't
provide exact instructions of where to insert
subroutine GenerateSIMhiddenFields, but one of
the suggested locations should work.

2. The subroutine GenerateSIMhiddenFields needs to be
called and it's returned value stored in a variable.
Your script can then use that variable to do what
it needs to do in order to get the fingerprint
information into your order verification page.

If the variable is named $hiddenSIMfields, then
this line might be used to call store the
fingerprint information into $hiddenSIMfields

my $hiddenSIMfields=GenerateSIMhiddenFields($amount,$currency);

$amount would be the total amount of the order and
the optional $currency would be the currency type.

Again, not knowing the script you're modifying, I can't provided instructions regarding the appropriate variable name to hold the fingerprint information, nor how your script will use the variable.

Using subroutine.cgi as a program by itself, as outlined in the "Using a Perl Program To Display the Form With Fingerprint Automatically Inserted" section, above, and reading the "Detailed Instructions For Master Form" section, below, might provide enough experience and understanding to make modifying your script somewhat easier.

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.