Hello, I need to check the transactions made on a pagseguro account, I'm using:
$initialDate = '2016-05-10';
$finalDate = '2016-06-10';
$email_pagseguro = '[email protected]';
$token_pagseguro = '**************************';
$url =
'
https://ws.pagseguro.uol.com.br/v2/transactions
?initialDate='.$initialDate.'T00:00
&finalDate='.$finalDate.'T00:00
&page=1
&maxPageResults=100
&email='.$email_pagseguro.'
&token='.$token_pagseguro
;
$ch = curl_init($url);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$output = curl_exec ($ch) or curl_error($ch);
curl_close ($ch);
return $output;
$transaction = simplexml_load_string($output);
echo $transaction -> transactions -> transaction -> status."<BR />";
echo $transaction -> transactions -> transaction -> paymentMethod."<BR />";
echo $transaction -> transactions -> transaction -> type."<BR />";
Does not return anything, where is the error?