$url = "http://localhost/api/";
$post_string = '
U1ZOH92275K2JUMV2JXC
RKNTFSWQI7KRM3KA72FX3L7L6U1CBN6LSYKROANX
Charge
10
1000
4916634239087777
10
2017
123
127.0.0.1
100.01
Goods and Services
';
$postfields = $post_string;
$ch = curl_init();
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_TIMEOUT, 60);
curl_setopt($ch, CURLOPT_POSTFIELDS, $postfields);
$data = curl_exec($ch);
if(curl_errno($ch))
{
print curl_error($ch);
}
else
{
curl_close($ch);
echo $data;
}