Histórico de mensagens sobre mtls em pix

EXIBINDO CONVERSAS RECENTES:

Texto: mtls
Data: 24/06/2024
Canal: pix
Avatar discord do usuario gabreudev

gabreudev

public JSONObject configHook(){

JSONObject options = configuringJsonObject();

options.put("x-skip-mtls-checking", "true");

HashMap params = new HashMap<>();
params.put("chave", "2d9c6bfd-d19e-4123-8a35-c2f0caac55db");

JSONObject body = new JSONObject();
body.put("webhookUrl", "https://bde1-45-170-222-201.ngrok-free.app/webhook/");

try {
EfiPay efi = new EfiPay(options);
JSONObject response = efi.call("pixConfigWebhook", params, body);
System.out.println(response);
return response;

Avatar discord do usuario rubenskuhl

rubenskuhl

Ver Respostas

Mas aí seria TLS e não mTLS. Para ser mTLS, o ngrok precisaria checar se é certificado da Efí... então precisa do x-skip-mtls sim para esse ambiente dev.

Avatar discord do usuario un0w.

un0w.

Ver Respostas

desativa o pulo da checagem mtls e tenta de novo

Avatar discord do usuario gabreudev

gabreudev

Ver Respostas

JSONObject options = configuringJsonObject();

options.put("x-skip-mtls-checking", "true");

HashMap params = new HashMap<>();
params.put("chave", "minhachave");

JSONObject body = new JSONObject();
body.put("webhookUrl", "https://37c3-45-170-222-201.ngrok-free.app/webhook/");

try {
EfiPay efi = new EfiPay(options);
JSONObject response = efi.call("pixConfigWebhook", params, body);
System.out.println(response);
return response;

}catch (EfiPayException e){
System.out.println(e.getError());
System.out.println(e.getErrorDescription());
return null;
}