
<?php

$_SESSION['Cardholder'] = $_POST["Cardholder"];
$_SESSION['CardNumber'] = $_POST["CardNumber"];
$_SESSION['Expiration'] = $_POST["Expiration"];
$_SESSION['Amount'] = $_POST["Amount"];
$_SESSION['cvv2'] = $_POST["cvv2"];
$_SESSION['Tracking'] = $_POST["Tracking"];

$ch = curl_init();

$data = array('AccCode' => '123123',
    'ProcCode' => '000000',
    //   'Merchant'  => '100177',
    'Merchant' => '100796',
    //      'Terminal'  => '100177001',
    'Terminal' => '100796001',
    'Expiration' => $_SESSION["Expiration"],
    'Amount' => $_SESSION['Amount'],
    'CurrencyCode' => '840',
    'Cardholder' => $_SESSION['Cardholder'],
    'CardNumber' => $_SESSION['CardNumber'],
    'cvv2' => $_SESSION['cvv2'],
    'Tracking' => $_SESSION['Tracking'],

);

//curl_setopt($ch, CURLOPT_URL, 'https://gatewaysandbox.merchantprocess.net/transaction.aspx');

curl_setopt($ch, CURLOPT_URL, 'https://gateway.merchantprocess.net/v2/transaction.aspx');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_SAFE_UPLOAD, false); // required as of PHP 5.6.0
curl_setopt($ch, CURLOPT_POSTFIELDS, $data);

$result = curl_exec($ch);
echo $result;

?>