When I try to create the payment, I get the following error. I'm using the following package: link
Additional information: For security reasons, the DTD is prohibited in this XML document. To enable processing of the DTD, set the DtdProcessing property in XmlReaderSettings as Parse, and pass the settings for the XmlReader.Create method.
I'm using a test code offered by Cigano in this topic :
The exception is raised in the following line:
var paymentRedirectUri = payment.Register(credentials);
I'm also using the sandbox environment of PagSeguro, and I already checked the credentials and URL sent (before I was giving 401 error).
I can work around the error described above by editing the API code in the following code block:
XmlReaderSettings settings = new XmlReaderSettings();
settings.ProhibitDtd = false;
using (XmlReader reader = XmlReader.Create(response.GetResponseStream(), settings))
{
//Codigo pagseguro
}
However, when I make this change, I get the following error when the API reads XML
Additional information: Invalid character in the provided encoding. Line 20, position 48.