Reply
Member
Posts: 1
Registered: ‎04-28-2011

C# GetSettledBatchList error "Object reference not set to an instance of an object."

Hi,

 

I am having a problem getting the GetSettledBatchList method to work in C#. I'm using the sample code provided on the Dev site.

 

I've enabled the API on the sandbox website and tried both "ServiceMode.Test" and "ServiceMode.Live".

 

The GetTransactionList works just fine for me, so I know my login credentials are good.

 

I can't think of anything else to try. Any help would be greatly appreciated.

 

Thanks!

Administrator
Posts: 591
Registered: ‎08-21-2009

Re: C# GetSettledBatchList error "Object reference not set to an instance of an object."

Unfortunately, that error isn't particularly helpful in determining what has gone wrong in the code. Can you tell me specifically which sample code are you using?

Member
Posts: 1
Registered: ‎06-22-2011

Re: C# GetSettledBatchList error "Object reference not set to an instance of an object."

Dear Trevor,


i just downloaded the latest SDK and Quick start sample.

 

By using the Quick Start sample, I submitted a CardPresentAuthorizeAndCaptureRequest and return ok.


When i try to run the sample reporting porject, i get the error "Object reference not set to an instance of an object.",

where batches.batchList is null.

 

I am using the C# version of the sample project.

 

gate.GetTransactionDetails works, but GetSettledBatchList & GetTransactionList error out on "Object reference not set..."

 

I know that I am running a test account and there will no settled batch, but it shouldnt error out. 




All Star
Posts: 1,072
Registered: ‎08-17-2009

Re: C# GetSettledBatchList error "Object reference not set to an instance of an object."

It looks like this may be an error in the SDK. We've reported it to our developers for their review.

 

Thanks,

 

Michelle

Developer Community Manager

Member
Posts: 1
Registered: ‎11-07-2011

Re: C# GetSettledBatchList error "Object reference not set to an instance of an object."

Hi there.  I'm receiving the "Object reference not set to an instance of an object" while using the C# API that is currently available for download from the download page.

 

I am able to successfully instantiate the ReportingGateway object with my client's keys for their auth.net account.  The error occurs on the next line when attempting to call the GetSettledBatchList function.

 

I am using the compiled binaries that are available for download; my code is in vb.net 2010.

 

Any thoughts on this would be great.  It looks like there are several different threads about this problem, and I see that there are posts that state that there has been a fix deployed, but given that I (believe I) have the latest version of the API, it appears that either I'm doing something wrong or that the fix in not in place.

 

Any help would be really appreciated.  My client wants to go live Thursday, and I've been pushing this off because I thought it was something in my code that I could fix later...

 

Thank you.

Administrator
Posts: 591
Registered: ‎08-21-2009

Re: C# GetSettledBatchList error "Object reference not set to an instance of an object."

Can you provide the exact line that is causing the error, and maybe the lines before where you create the gateway object?

Member
Posts: 1
Registered: ‎02-14-2012

Re: C# GetSettledBatchList error "Object reference not set to an instance of an object."

Has this bug been fixed?  I am getting the same issue when calling GetSettledBatchList.  The error occurs any time I specify dates that return no results.  If results exist, the function works.  Any information to resolve this would be appreciated.

Administrator
Posts: 591
Registered: ‎08-21-2009

Re: C# GetSettledBatchList error "Object reference not set to an instance of an object."

No, unfortunately this has not yet been fixed. I was unable to reproduce the error in my own tests, but I did my testing for dates that contained transactions. You mentioned that this happens for date ranges that do not return any results and that is likely what I was missing. I'll do some additional testing and report it to our SDK developers to hopefully get it fixed.

Member
Posts: 1
Registered: ‎04-14-2014

Re: C# GetSettledBatchList error "Object reference not set to an instance of an object."

is this fixed yet?

 

 

Thanks

NS

Posts: 2,765
Topics: 57
Kudos: 251
Blog Posts: 67
Registered: ‎12-05-2011

Re: C# GetSettledBatchList error "Object reference not set to an instance of an object."

Hello @planet4379 

 

Yes, this issue should be corrected.  You can obtain the latest version from Github: https://github.com/AuthorizeNet/sdk-dotnet.

 

Richard