cqp hace 2 días
padre
commit
02abd81176
Se han modificado 1 ficheros con 5 adiciones y 1 borrados
  1. 5 1
      app/Console/Commands/U8SettleInventory.php

+ 5 - 1
app/Console/Commands/U8SettleInventory.php

@@ -225,11 +225,15 @@ class U8SettleInventory extends Command
 
         $ch = curl_init();
         curl_setopt($ch, CURLOPT_URL, $url);
-        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
+        curl_setopt($ch,  CURLOPT_RETURNTRANSFER, true);
+        curl_setopt($ch, CURLOPT_ENCODING, '');
         curl_setopt($ch, CURLOPT_POST, 1);
+        curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
         curl_setopt($ch, CURLOPT_HTTPHEADER, $header);
         curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
+        curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
         curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
+        curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout);
         if(!is_null($data)) curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
 
         $r = curl_exec($ch);