$ambiente = 0;
if($ambiente == 0) {
$url_base = “https://eb-api.plataformahub.com.br/RestServiceImpl.svc/setcategory/2732”;
} else if ($ambiente == 1) {
$url_base = “https://eb-api-sandbox.plataformahub.com.br/RestServiceImpl.svc/setcategory/2732”;
}
//$url = $url_base.“setcategory/”.$idmkt;
$header = array(“content-type: application/json”,
“auth: xxxxxxxxxxFzb2FyZXM6cHdk”);
$code=“L5-55”;
$name=“GRAVANDO”;
$params=array(“code” => $code, “name” => $name,);
$curl = curl_init();
curl_setopt_array($curl, [CURLOPT_URL => $url_base,
CURLOPT_SSL_VERIFYPEER => false,
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => “”,
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => “POST”,
CURLOPT_HTTPHEADER => $header,
CURLOPT_POSTFIELDS => $params]);
$resposta = curl_exec($curl);
if(curl_errno($curl))
{
echo "Curl error: " . curl_error($curl);
}
curl_close($curl);
sc_alert(“Categorias enviadas à HUB2B com sucesso!”);
a rotina acima dentro scriptcase nao retorna nada, nem erro, alguem poderia ter uma ideia do que possa ser