Histórico de mensagens sobre pixConfigWebhook em pix

EXIBINDO CONVERSAS RECENTES:

Texto: pixConfigWebhook
Canal: pix
Avatar discord do usuario felipenunes0714

felipenunes0714


/
Detailed endpoint documentation
https://dev.efipay.com.br/docs/api-pix/webhooks#configurar-o-webhook-pix
/

$autoload = realpath(__DIR__ . "../../../../../../../vendor/autoload.php");
if (!file_exists($autoload)) {
die("Autoload file not found or on path $autoload.");
}
require_once $autoload;

use Efi\Exception\EfiException;
use Efi\EfiPay;

$optionsFile = __DIR__ . "/../../credentials/options.php";
if (!file_exists($optionsFile)) {
die("Options file not found or on path $options.");
}
$options = include $optionsFile;

$options["headers"] = [
"x-skip-mtls-checking" => false
];

$params = [
"chave" => ""
];

$body = [
"webhookUrl" => ""
];


try {
$api = new EfiPay($options);
$response = $api->pixConfigWebhook($params, $body);

if (isset($options["responseHeaders"]) && $options["responseHeaders"]) {
print_r("

" . json_encode($response->body, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) . "
");
print_r("
" . json_encode($response->headers, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) . "
");
} else {
print_r("
" . json_encode($response, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) . "
");
}
} catch (EfiException $e) {
print_r($e->code . "
");
print_r($e->error . "
");
print_r($e->errorDescription) . "
";
if (isset($options["responseHeaders"]) && $options["responseHeaders"]) {
print_r("
" . json_encode($e->headers, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE | JSON_UNESCAPED_SLASHES) . "
");
}
} catch (Exception $e) {
print_r($e->getMessage());
}