<?php
//set GET values, to local variables.
$transid = $_GET['PNREF'];
$result = $_GET['RESULT'];
$last4 = $_GET['ACCT'];
$amount = $_GET['AMT'];
$cardType = $_GET['CARDTYPE'];
$respMsg = $_GET['RESPMSG'];
$invnum = $_GET['INVNUM'];
//check the card type
if ($cardType == "0") {$cardType = "Visa";
} else if ($cardType == "1") { $cardType = "Master Card";
} else if ($cardType == "2") {$cardType = "Discover";
} else if ($cardType == "3") {$cardType = "AMEX";
} else {$cardType = "Credit Card";
}
//display something based on the RESULT of the Transaction
if ($result == "0") {
$html = "<br />Thank you for your payment!<br /><br />Details:<br />Order ID: " .
$transid . "<br />Invoice ID: " . $invnum . "<br />Amount: $" . $amount .
"<br />Card Type: " . $cardType . "<br />Card Used: ************" . $last4 . "<br />";
} else {
$html = "<br />There seems to have been a problem with your transaction.<br />Transaction Details: " .
$respMsg;
}
echo $html;
?>
|