process($myorder); # use shared library model
$result = $mylphp->curl_process($myorder); # use curl methods
if ($result["r_approved"] != "APPROVED") // transaction failed, print the reason
{
//$card_err_msg = "Status: $result[r_approved]
\n";
//$card_err_msg = $card_err_msg . "Error: $result[r_error]
\n";
$card_err_msg = "Oops! We're sorry, there seems to be a problem with this credit card number. Please try submitting it again, or try using a different card.";
form_set_error('submitted][card_number', t($card_err_msg));
//exit()
//echo $card_err_msg;
//print "Status: $result[r_approved]
\n";
//print "Error: $result[r_error]
\n";
}
else // success
{
//print "Status: $result[r_approved]
\n";
//print "Transaction Code: $result[r_code]
\n";
}
# if verbose output has been checked,
# print complete server response to a table
/*
if ($_POST["verbose"])
{
echo "
| " . htmlspecialchars($key) . " | "; echo "" . htmlspecialchars($value) . " | "; echo "