Opa
I am generating the payment via pagseguro and storing its transaction code for later consultation. In the transaction query, by transaction code I'm doing this:
$email_pagseguro = '[email protected]';
$token_pagseguro = '****************************';
$url = 'https://ws.pagseguro.uol.com.br/v2/transactions/'.$tabela_itens['usuario_checkout_transactionCode'].'?email='.$email_pagseguro.'&token='.$token_pagseguro;
$_h = curl_init();
//curl_setopt($_h, CURLOPT_HEADER, 1);
curl_setopt($_h, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($_h, CURLOPT_HTTPGET, 1);
curl_setopt($_h, CURLOPT_URL, $url );
curl_setopt($_h, CURLOPT_SSL_VERIFYPEER, TRUE);
curl_setopt($_h, CURLOPT_SSL_VERIFYHOST, 2);
curl_setopt($_h, CURLOPT_DNS_USE_GLOBAL_CACHE, false );
curl_setopt($_h, CURLOPT_DNS_CACHE_TIMEOUT, 2 );
$output = curl_exec($_h);
var_dump($output);
//$transaction = simplexml_load_string($output);
The var_dump is returning a text with all transaction data, a string, where I believe I should be returning an xml.