- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm using the following environment:
- Nuget package of the SDK (2.0.1 - https://github.com/AuthorizeNet/sdk-dotnet)
- C#
- Visual Studio 2019
- Sandbox accounts using test cards and zipcodes.
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.
Solved! Go to Solution.
โ05-24-2020 11:53 AM
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
โ05-25-2020 11:46 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Additional details:
BaseUrl: https://test.authorize.net
CardPresentUrl: https://test.authorize.net
XmlBaseUrl: https://apitest.authorize.net
โ05-25-2020 02:04 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
โ05-25-2020 11:46 PM