Discussions
Error in getting orders
almost 8 years ago by Raj
Error:Could not resolve host: sandbox-sellerapi.snapdeal.com
please follow the code:
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "http://sandbox-sellerapi.snapdeal.com/apidocs/index.html#!/Order_Management/getNewOrders");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "GET");
$headers = array();
$headers[] = "X-Auth-Token: 70f27503-495e-3dae-a921-e4d1fb84ff64";
$headers[] = "X-Seller-Authz-Token: bb0ac30c-e3ae-48a8-8b93-7a4ecdb6fe70";
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
$result = curl_exec($ch);
if (curl_errno($ch)) {
echo 'Error:' . curl_error($ch);
}
curl_close ($ch);