cancel
Showing results for 
Search instead for 
Did you mean: 

.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);

mroach
Member
4 REPLIES 4

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

Michelle
All Star

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

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?

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.