I do not get POST sandbox in my PagSeguro (PHP) notifications URL

1

In TOTAL absence of any return in the dev community of the pagseguro I'm here to see if any good soul has any suggestions. I can not receive the Sandbox notifications from the pagseguro, in fact the sandbox (apparently) nor send. There are no requests attempts on my URL for my server logs.

There is, of course, the possibility that the problem is the sandbox. But I would like to eliminate all possible problems to be sure.

By entering the notification code by GET or by doing the POST test by ARC the script runs fine. It's this:

<?php
header("access-control-allow-origin: https://sandbox.pagseguro.uol.com.br");

$notificationCode = preg_replace('/[^[:alnum:]-]/','',$_GET["notificationCode"]);

$data = array(
    'email' => ' ',
    'token' => ' '
);

$data = http_build_query($data);

$url = 'https://ws.sandbox.pagseguro.uol.com.br/v3/transactions/notifications/'.$notificationCode.'?'.$data;

$curl = curl_init($url);
        curl_setopt($curl, CURLOPT_URL, $url);
        curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
        curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, true);
        curl_setopt($curl, CURLOPT_HTTP_VERSION, CURL_HTTP_VERSION_1_1);
        curl_setopt($curl, CURLOPT_SSLVERSION, CURL_SSLVERSION_TLSv1_2);

$retorno = curl_exec($curl);

curl_close($curl);

$retorno = simplexml_load_string($retorno);

$codigoTransacao = $retorno->code;

$fp = fopen("logNotifications.txt", "a");
$escreve = fwrite($fp, "\n CÓDIGO DA TRANSAÇÃO PRA TESTE: {$codigoTransacao}");
fclose($fp);

?>

I have tried to change the parameters of CURL by removing CURLOPT_HTTP_VERSION and CURLOPT_SSLVERSION, changing CURLOPT_SSL_VERIFYPEER to false ... nothing solves.

I read that the Sandbox only operates on SSL and TLS version 1.2, my notification URL is https: // and my server data is:

OS: Linux
PHP version: 5.6.36
curl version: 7.59.0
SSL version: OpenSSL/1.0.2o
SSL version number: 0
OPENSSL_VERSION_NUMBER: 100020ff
TLS test (default): TLS 1.2
TLS test (TLS_v1): TLS 1.2
TLS test (TLS_v1_2): TLS 1.2

I have tried sending the url of notification during the purchase for the pagseguro by code, and without sending. The notification url is configured in the sandbox integration profiles on both the vendor and the application, and there's no way around it. The return is always the one when I try to send:

IfIclearthenotificationfieldrightthereinthetransactiondetails,itgeneratesalogstatingthatthenotificationURLisinvalid.ThismademequestionifthereisanyproblemwithmyreceivingURL.

I'vealreadytestedtoseeiftherewasanylockontheserverregardingthepagseguroURL,nothing.

#pingws.sandbox.pagseguro.uol.com.brPINGws.sandbox.pagseguro.uol.com.br(186.234.51.18)56(84)bytesofdata.64bytesfrom186.234.51.18(186.234.51.18):icmp_seq=1ttl=245time=2.26ms64bytesfrom186.234.51.18(186.234.51.18):icmp_seq=2ttl=245time=1.34ms^C---ws.sandbox.pagseguro.uol.com.brpingstatistics---2packetstransmitted,2received,0%packetloss,time1001msrttmin/avg/max/mdev=1.349/1.806/2.263/0.457ms

Ithinkit'snotaportproblemeitherbecausetheserveroperatesat80and443(https)andthepagsegurodocumentation,that'sright.

I'vealsotriedthesuggested#

Is there something I'm missing?

    
asked by anonymous 30.08.2018 / 22:05

0 answers