Reply
Member
mroach
Posts: 3
Registered: ‎01-18-2012

.NET SDK 1.6: StackOverflowException when reading properties

When attempting to read (get method) the BankAccountType and EcheckType properties from a GatewayRequest, you'll get a StackOverflowException.

 

This is caused by the get{} implementations of these properties on lines 356 and 380 respectively of GatewayRequest.cs. To correct this problem, change the code to:

 

Line 356: get { return (BankAccountType)Enum.Parse(typeof(BankAccountType), Get(ApiFields.BankAcctType), true); }

Line 380: get { return (EcheckType)Enum.Parse(typeof(EcheckType), Get(ApiFields.EcheckType), true); }

 

Code to reproduce the error in SDK 1.6

 

var req = new EcheckRequest(10.00m, "011000138", "1234567890", BankAccountType.Checking, "Bank of America N.A.", "Jean Luc Picard", "0000");

// this works, no problem
Console.WriteLine(req.ToPostString());

// get ready for a StackOverflowException
Console.WriteLine(req.BankAccountType);
Console.WriteLine(req.EcheckType);

Administrator
Michelle
Posts: 1,050
Registered: ‎08-17-2009

Re: .NET SDK 1.6: StackOverflowException when reading properties

Hey mroach,

 

Thanks for posting this! We've put this on our list of updates to make in a future release of the SDK. But until then, this should be great for anyone using the SDK.

 

Thanks,

 

Michelle

Developer Community Manager

Moderator
Trevor
Posts: 545
Registered: ‎08-21-2009

Re: .NET SDK 1.6: StackOverflowException when reading properties

This should now be resolved in version 1.7 of the SDK which was posted late last night.  Thanks again for the bug report!

Member
mroach
Posts: 3
Registered: ‎01-18-2012

Re: .NET SDK 1.6: StackOverflowException when reading properties

Great! Thanks for the update. Is there any way to subscribe to be notified when SDK updates are released? Also, have you guys considered putting the SDK onto Github so the community can help with pathches like this?

Moderator
Trevor
Posts: 545
Registered: ‎08-21-2009

Re: .NET SDK 1.6: StackOverflowException when reading properties

At this time, there isn't a way to subscribe to news updates notifying of SDK updates.  We will most likely be releasing another update to the .Net SDK in the next week or two and I will see if we can come to decision on how to anounce these updates in a more consistent manner. My guess is that we are more likely to provide this through something like an RSS feed than through some sort of push notification like an email. 

 

We have discussed putting the projects on Github, but it is not something that we are ready to do at this time.  It is certainly a possibility that we will continue evaluate as we move forward.