curl_setopt_array($curl, array(
CURLOPT_URL => "https://api-pix.gerencianet.com.br/v2/webhook/" . $chave, // Rota base, homologaço ou produço
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 0,
CURLOPT_FOLLOWLOCATION => true,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => $json,
CURLOPT_SSLCERT => $config["certificado"], // Caminho do certificado
CURLOPT_SSLCERTPASSWD => "",
CURLOPT_HTTPHEADER => array(
"Content-Type: application/json",
"authorization: Bearer " . $access_token,
"x-skip-mtls-checking: false"
),
));
$response = curl_exec($curl);