" . (($_POST["subscription"]==75)?("1 Year"):("2 Years")) . ", Total Charged to Credit Card: $" . $_POST["subscription"] . "
\n" . $print_cust_data . "
\n";
$loginID = "r8v3y2zpb";
$transactionKey = "6EnU7Fq6fMZ26782";
$amount = (int)$_POST["subscription"];
$description = "S&B Report Subscription: " . (($_POST["subscription"]==75)?("1 Year"):("2 Years"));
$label = "Confirm Order and Proceed to Checkout"; // The is the label on the 'submit' button
//$testMode = "false";
// By default, this sample code is designed to post to our test server for
// developer accounts: https://test.authorize.net/gateway/transact.dll
// for real accounts (even in test mode), please make sure that you are
// posting to: https://secure.authorize.net/gateway/transact.dll
//$url = "https://test.authorize.net/gateway/transact.dll";
$url = "https://secure.authorize.net/gateway/transact.dll";
// an invoice is generated using the date and time
$invoice = date(YmdHis);
// a sequence number is randomly generated
$sequence = rand(1, 1000);
// a timestamp is generated
$timeStamp = time ();
// The following lines generate the SIM fingerprint. PHP versions 5.1.2 and
// newer have the necessary hmac function built in. For older versions, it
// will try to use the mhash library.
if( phpversion() >= '5.1.2' )
{ $fingerprint = hash_hmac("md5", $loginID . "^" . $sequence . "^" . $timeStamp . "^" . $amount . "^", $transactionKey); }
else
{ $fingerprint = bin2hex(mhash(MHASH_MD5, $loginID . "^" . $sequence . "^" . $timeStamp . "^" . $amount . "^", $transactionKey)); }
// Print the Amount and Description to the screen.
/* $print_form .= "Amount: $amount ";
$print_form .= "Description: $description "; */
// Create the HTML form containing necessary SIM post values
$print_form .= "