4
According to Pagseguro, I need to do a GET and then receive the data that comes in XML format Documentation.
I’m caught up in that part:
To consult a transaction notification, you must make a request to the Notification Query API, informing the code of the notification. The figure below illustrates a call to that API, which uses the HTTP protocol and the GET method (lines have been broken for easy reading).
So I did this:
string pagina = string.Format("https://ws.pagseguro.uol.com.br/v3/transactions/notifications/{0}?email={1}&token={2}",notificationCode, email, token);
Searching I got to this code to be doing a GET on the page:
System.Net.HttpWebRequest req = (System.Net.HttpWebRequest)System.Net.WebRequest.Create(pagina);
req.Method = "POST";
req.ContentType = "application/x-www-form-urlencoded";
But I don’t know how to proceed.
What I did, is right? And now how can I be getting the data from Pagseguro?