API PagSeguro how to get payment status by ID

1

Hello, I searched a lot about this by looking at the git of PagSeguro but I could not understand, what I want is the following

mysite.com/check.php?id=ID-DA-TRANSLATION-?token=MEU-TOKEN?email=MEU-EMAIL

Type if there is payment with id of the transaction placed in the link to the account and token it will return all the information (echo $ info dar_dump?) of the payment, I did not understand the API of PagSeguro enough to do this so I came to ask your help, thank you.

    
asked by anonymous 27.06.2018 / 17:40

1 answer

0

Basically you will do this:

$curl=curl_init("https://ws.pagseguro.uol.com.br/v3/transactions/{{codigo-transacao}}?{{credenciais}}");
curl_setopt($curl,CURLOPT_SSL_VERIFYPEER,false);
curl_setopt($curl,CURLOPT_RETURNTRANSFER,true);
$xml=simplexml_load_string(curl_exec($curl));
curl_close($curl);
var_dump($xml);
  • credentials = the registered credentials id=

  • complete url example: email=SEU_EMAIL&token=SEU_TOKEN You search for all transaction information.

27.06.2018 / 19:47