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


Changing Transaction Keys

If in the future you suspect your Transaction Key has been compromised, you'll need to generate another Transaction Key and update your script with the new Transaction Key.

There is a method you can use to avoid having to modify your script when you change your Transaction Key. That method is to keep the Transaction Key in a separate plain text file. When your script runs, it retrieves the Transaction Key from the plain text file.

You change the plain text file when your Transaction Key changes, not the script itself.

This is how you set it up.

1. Decide on a file name for the file to contain
your Transaction Key. A file name extension of
".cgi" (or ".pl" if your server runs scripts only
with the .pl extension) could prevent the file
contents from displaying in snooper's browsers.

2. In your script, find the line where you assign the
Transaction Key to a variable. It may be something
like this:

my $transactionKey = 'ab32NOP';


Replace that line with these four lines:

open RgSIMhf,'____________';
my $transactionKey = join '',<RgSIMhf>;
close RgSIMhf;
$transactionKey =~ s/^\s*(.*?)\s*$/$1/s;


Replace the underline in the first of the above
four lines with the file name you decided upon in
step 1.

Upload your script and verify that it has 755
permissions.

3. Use a plain text word processor, like NotePad or
BBEdit, and paste or type the Transaction Key into
the workspace window. Save the file with the file
name you decided upon in step 1.

3. Upload the file with the Transaction Key into the
same directory where your script is installed.

Now, whenever you change your Transaction Key, you only need to change the one small plain text file.

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.