Histórico de mensagens sobre pix em pix

EXIBINDO CONVERSAS RECENTES:

Texto: pix
Canal: pix
Avatar discord do usuario fpsgoapp

fpsgoapp

Será que a criação de um subdomínio seria a única opção? Configurado no padrão do GN Pix

Avatar discord do usuario fpsgoapp

fpsgoapp

O nosso problema é precisar do certificado cliente principal para a aplicação e o certificado cliente Pix para a rota Pix

Avatar discord do usuario rubenskuhl

rubenskuhl

Ver Respostas

O exemplo da GN para Nginx separa o mTLS só em um path:
server {
#
# ...
#
listen [::]:443 ssl ipv6only=on;
listen 443 ssl;
ssl_certificate server_ssl.crt.pem;
ssl_certificate_key server_ssl.key.pem;
ssl_client_certificate /root/chain-pix-webhooks-prod.crt;
ssl_verify_client optional;
ssl_verify_depth 3;
#
# ...
#
location /webhook {
if ($ssl_client_verify != SUCCESS) {
return 403;
}
rewrite ^(.)$ /webhook;
}
}

Avatar discord do usuario fpsgoapp

fpsgoapp

Teríamos que alterar o certificado somente para a rota Pix

Avatar discord do usuario fpsgoapp

fpsgoapp

Ver Respostas

Boa tarde. Alguém sabe a melhor maneira para configuração da webhook Pix dentro de uma rota específica, devido a verificação de mTLS

Avatar discord do usuario rubenskuhl

rubenskuhl

Não, chave é a chave Pix da sua conta.

Avatar discord do usuario roguitar88

roguitar88

Esse é o código que tô usando pra criar o PIX:

Avatar discord do usuario roguitar88

roguitar88

Ver Respostas

Pois é... Só que não funcionou aqui... Na hora de criar o pix... Olha

Avatar discord do usuario roguitar88

roguitar88

Ver Respostas

{"access_token":"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJ0eXBlIjoiYWNjZXNzX3Rva2VuIiwiY2xpZW50SWQiOiJDbGllbnRfSWRfZjA3NzkyYjUyMzg5YmQzNzk1MWVkY2JlYmYzOTM2OTVhNWVlZDI2YiIsImFjY291bnQiOjI0MDQxMCwiYWNjb3VudF9jb2RlIjoiMGFlYTcwMWNlOWM5YmFiN2Q3NDc4NGJjN2RlNTc3YmQiLCJzY29wZXMiOlsiY29iLnJlYWQiLCJjb2Iud3JpdGUiLCJnbi5iYWxhbmNlLnJlYWQiLCJnbi5waXguZXZwLnJlYWQiLCJnbi5waXguZXZwLndyaXRlIiwiZ24uc2V0dGluZ3MucmVhZCIsImduLnNldHRpbmdzLndyaXRlIiwicGF5bG9hZGxvY2F0aW9uLnJlYWQiLCJwYXlsb2FkbG9jYXRpb24ud3JpdGUiLCJwaXgucmVhZCIsInBpeC5zZW5kIiwicGl4LndyaXRlIiwid2ViaG9vay5yZWFkIiwid2ViaG9vay53cml0ZSJdLCJleHBpcmVzSW4iOjM2MDAsImNvbmZpZ3VyYXRpb24iOnsieDV0I1MyNTYiOiJkR09nK1FMdFN4ZXRReWVnZUVuM1VaL1EwK2pBWTJpQ1l6eENNRDZTbzRFPSJ9LCJpYXQiOjE2MTYzMzcxNDQsImV4cCI6MTYxNjM0MDc0NH0.Ng-m4jLCaSO1H0yLmHnQDiiJ_axWGZkeH39kYwebPbE","token_type":"Bearer","expires_in":3600,"scope":"cob.read cob.write gn.balance.read gn.pix.evp.read gn.pix.evp.write gn.settings.read gn.settings.write payloadlocation.read payloadlocation.write pix.read pix.send pix.write webhook.read webhook.write"}

Avatar discord do usuario roguitar88

roguitar88

Ver Respostas

Fatal error: Uncaught Error: Bad Request in /var/www/html/olimppius/src/Classes/ClassOrder.php:890 Stack trace: #0 /var/www/html/olimppius/app/Controller/ControllerPix.php(20): Src\Classes\ClassOrder->hirePlan() #1 /var/www/html/olimppius/app/Dispatch.php(44): App\Controller\ControllerPix->__construct() #2 /var/www/html/olimppius/app/Dispatch.php(36): App\Dispatch->addController() #3 /var/www/html/olimppius/public/index.php(7): App\Dispatch->__construct() #4 {main} thrown in /var/www/html/olimppius/src/Classes/ClassOrder.php on line 890

Avatar discord do usuario roguitar88

roguitar88

Fatal error: Uncaught Error: cURL error 58: unable to set private key file: '/etc/certs-gerencianet/olimppiuspix.crt.pem' type PEM (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) in /var/www/html/olimppius/src/Classes/ClassOrder.php:890 Stack trace: #0 /var/www/html/olimppius/app/Controller/ControllerPix.php(20): Src\Classes\ClassOrder->hirePlan() #1 /var/www/html/olimppius/app/Dispatch.php(44): App\Controller\ControllerPix->__construct() #2 /var/www/html/olimppius/app/Dispatch.php(36): App\Dispatch->addController() #3 /var/www/html/olimppius/public/index.php(7): App\Dispatch->__construct() #4 {main} thrown in /var/www/html/olimppius/src/Classes/ClassOrder.php on line 890

Avatar discord do usuario rubenskuhl

rubenskuhl

Ver Respostas

chmod 644 olimppuspix.pem

Avatar discord do usuario roguitar88

roguitar88

Ver Respostas

olimppiuspix.crt.pem is not readable! realpath: "/etc/certs-gerencianet/olimppiuspix.crt.pem" - working dir: "/var/www/html/olimppius/src/Includes" effective user: Array ( [name] => www-data [passwd] => x [uid] => 33 [gid] => 33 [gecos] => www-data [dir] => /var/www [shell] => /usr/sbin/nologin )

Avatar discord do usuario roguitar88

roguitar88

$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api-pix-h.gerencianet.com.br/oauth/token');
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, true);
$pem=realpath("/etc/certs-gerencianet/olimppiuspix.crt.pem");
if(!$pem || !is_readable($pem)){
die("olimppiuspix.crt.pem is not readable! realpath: \"{$pem}\" - working dir: \"".getcwd()."\" effective user: ".print_r(posix_getpwuid(posix_geteuid()),true));
}
curl_setopt($ch, CURLOPT_SSLCERT, $pem);

Avatar discord do usuario roguitar88

roguitar88

Já tentei renomear de olimppiuspix.crt.pem para olimppiuspixcrt.pem (pensando ser problema na extensão do arquivo) e dá a mesma coisa...

Avatar discord do usuario roguitar88

roguitar88

O caminho é aquele mesmo: "/etc/certs-gerencianet/olimppiuspix.crt.pem"

Avatar discord do usuario roguitar88

roguitar88

Fatal error: Uncaught Error: cURL error 58: could not load PEM client certificate, OpenSSL error error:0200100D:system library:fopen:Permission denied, (no key found, wrong pass phrase, or wrong file format?) (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) in /var/www/html/olimppius/src/Classes/ClassOrder.php:889 Stack trace: #0 /var/www/html/olimppius/app/Controller/ControllerPix.php(20): Src\Classes\ClassOrder->hirePlan() #1 /var/www/html/olimppius/app/Dispatch.php(44): App\Controller\ControllerPix->__construct() #2 /var/www/html/olimppius/app/Dispatch.php(36): App\Dispatch->addController() #3 /var/www/html/olimppius/public/index.php(7): App\Dispatch->__construct() #4 {main} thrown in /var/www/html/olimppius/src/Classes/ClassOrder.php on line 889