I have a trouble .From HunterExpress API, I want to fetch freight charge amount for that passing postCode,product dimensions/weight etc I am using the following code to fetch freight charge
$data = array(
'username' => "xxx",
'password' => "xxx",
'customerCode' => "DUMMY",
'fromLocation' => array( "suburbName"=> "MELBOURNE", "postCode"=> "3000", "state"=> "VIC"),
'toLocation' =>array( "suburbName"=> "SYDNEY", "postCode"=> "2000", "state"=> "NSW"),
'goods' =>array( "pieces"=> "2",
'weight' => "3",
'width' => "10",
'height' => "20",
'depth' => "12",
'typeCode' => "ENV")
);
$url = "https://api_link";//Api Link
curl_setopt($ch, CURLOPT_URL,$url);
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$result = curl_exec($ch);
echo $result;
But it didn't show any result and no error