Reply
Contributor
Posts: 21
Registered: ‎08-17-2012
Accepted Solution

Authorize.Net SDK Error - "There was an error generating the XML document"

I'm using the following environment:

 

The request is successfully built however when I call the following code:

 

_oTranController = new AuthNetControllers.createTransactionController(apiRequest: _oTranRequest);
_oTranController.Execute();
_oResponse = _oTranController.GetApiResponse();

The response object is NULL

 

I get the exception There was an error generating the XML document

Nothing shows up anywhere else, just that error.

 

Any help appreciated.


Accepted Solutions
Solution
Accepted by topic author ShadowDancerLV
‎05-25-2020 11:47 PM
Contributor
Posts: 21
Registered: ‎08-17-2012

Re: Authorize.Net SDK Error - "There was an error generating the XML document"

Solution founds. 

Following fixes:

1. paymentType needed to be the actual  creditcard variable not an enumerator type.

               _paymentType = new AuthNetContract.paymentType
                {
                    Item = _creditCardType
                };

2. The expirationdate was returning 4 digit year instead of 2 digit year.

View solution in original post


All Replies
Contributor
Posts: 21
Registered: ‎08-17-2012

Re: Authorize.Net SDK Error - "There was an error generating the XML document"

Additional details:

 

BaseUrl: https://test.authorize.net
CardPresentUrl: https://test.authorize.net
XmlBaseUrl: https://apitest.authorize.net

Solution
Accepted by topic author ShadowDancerLV
‎05-25-2020 11:47 PM
Contributor
Posts: 21
Registered: ‎08-17-2012

Re: Authorize.Net SDK Error - "There was an error generating the XML document"

Solution founds. 

Following fixes:

1. paymentType needed to be the actual  creditcard variable not an enumerator type.

               _paymentType = new AuthNetContract.paymentType
                {
                    Item = _creditCardType
                };

2. The expirationdate was returning 4 digit year instead of 2 digit year.