fbpx

Los Angeles


Pay With Card
Course
Start Date






Product: Garnish Music Production Course
Product Code: GMPC
Quantity:
Course:

 

// echo’

';
// print_r($_POST);

function requestXML(){
$shreference = ‘sh220481′;
$checkcode =’927161’;
$authentication = ‘transaction ‘;
$cardnumber = $_POST[‘cardnumber’];
$cardstartmonth = $_POST[‘cardstartmonth’];
$cardstartyear = $_POST[‘cardstartyear’];
$cardexpiremonth = $_POST[‘cardexpiremonth’];
$cardexpireyear = $_POST[‘cardexpireyear’];
$cv2 = $_POST[‘cv2’];
$cardholdersname = $_POST[‘cardholdersname’];
$cardholdersemail = $_POST[‘cardholdersemail’];
$cardholderaddr1 = $_POST[‘cardholderaddr1’];
$cardholderaddr2 = $_POST[‘cardholderaddr1’];
$cardholdercity = $_POST[‘cardholdercity’];
$cardholderstate = $_POST[‘cardholderstate’];
$cardholderpostcode = $_POST[‘cardholderpostcode’];
$transactioncurrency = ‘GBP’;
$transactionamount =’499′;
$transactiontax = ‘0’;
$shippingcharge =’0′;
$secuitems =’ $xml = simplexml_load_string(‘‘);
$xml->addChild(‘type’, ‘transaction’);
$xml->addChild(‘authtype’, ‘authorise’);
$authentication = $xml->addChild(‘authentication’);
$authentication->addChild(‘shreference’, $shreference);
$authentication->addChild(‘checkcode’, $checkcode);
$transaction = $xml->addChild(‘transaction’);
$transaction->addChild(‘cardnumber’, $cardnumber);
$transaction->addChild(‘cardstartmonth’, $cardstartmonth);
$transaction->addChild(‘cardstartyear’, $cardstartyear);
$transaction->addChild(‘cardexpiremonth’, $cardexpiremonth);
$transaction->addChild(‘cardexpireyear’, $cardexpireyear);
$transaction->addChild(‘cv2’, $cv2);
$transaction->addChild(‘cardholdersname’, $cardholdersname);
$transaction->addChild(‘cardholdersemail’, $cardholdersemail);
$transaction->addChild(‘cardholderaddr1’, $cardholderaddr1);
$transaction->addChild(‘cardholderaddr2’, $cardholderaddr2);
$transaction->addChild(‘cardholdercity’, $cardholdercity);
$transaction->addChild(‘cardholderstate’, $cardholderstate);
$transaction->addChild(‘cardholderpostcode’, $cardholderpostcode);
$transaction->addChild(‘transactioncurrency’, $transactioncurrency);
$transaction->addChild(‘transactionamount’, $transactionamount);
$transaction->addChild(‘transactiontax’, $transactiontax);
$transaction->addChild(‘shippingcharge’, $shippingcharge);
$transaction->addChild(‘secuitems’, $secuitems);

return $xml->asXML();
}

function pay_trac(){
$postField = “xmldoc=” . urlencode( requestXML() );
$ch = curl_init();
curl_setopt ($ch, CURLOPT_URL, “https://www.secure-server-hosting.com/secutran/api.php”);
curl_setopt ($ch, CURLOPT_POST, 1);
curl_setopt ($ch, CURLOPT_POSTFIELDS, $postField);
curl_setopt ($ch, CURLOPT_HEADER, 0);
curl_setopt ($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt ($ch, CURLOPT_TIMEOUT, 60);
$xmlResponse = trim(curl_exec ($ch));
if ($xmlResponse == “”) print (date(“Y-m-d H:i:s”).” XML Doc Empty”);
if (curl_error($ch)) print (date(“Y-m-d H:i:s”).” cURL Call Failed – “.curl_error($ch));
curl_close ($ch);
return $xmlResponse;
}

if(isset($_POST[‘cardnumber’])){
if(!($response = simplexml_load_string(pay_trac()))){
print (date(“Y-m-d H:i:s”).” Unable to parse XML response”);
} else {
if($response->status == “OK”){
print (date(“Y-m-d H:i:s”).” Transaction successfully authorised: “.$response->reference);

$rtn_msg = $response->reference;
} else {
if($response->statustext = “TRANSACTION_ERROR”){
print (date(“Y-m-d H:i:s”).” “.$response->reason);
$rtn_msg = $response->reason;
} else {
print (date(“Y-m-d H:i:s”).” “.strtolower($response->statustext));

$rtn_msg = $response->statustext;
}
}
}

}

?>

SECURE PAYMENT FORM
Your purchases :

Code Name Quantity Course Total
GMPC Garnish Music Production Course 1 GBP 499
Card Holder Details – * indicates a required field.
Name:
*
Email address:
*
Phone number:
*
Street:
*
City/Town:
*
County:
*
Postcode:
*
Card type:
*
Start date:
/
Card number:
*
Expiry date:
/*
CV2 number:
*