<?php

$data_string = '{"ref":"00084","trans_type":"12","order_date":"24\/09\/2019","bank":"1","customer_id":"1","branch_id":"1","payment_mode":"1","payment_amount":900,"bank_ref":"456778","type_no":147}';
//$ch = curl_init('http://accounts.packsolltd.com/modules/api/sales/pospay/');
$ch = curl_init('http://localhost/frontaccounting/modules/api/sales/pospay/');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_HTTPHEADER, array(
    'Content-Type: application/json',
    'Accept: application/json',
    'X-COMPANY:0',
    'X-USER:admin',
    'X-PASSWORD:1234')
);
curl_setopt($ch, CURLOPT_POSTFIELDS, $data_string);

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