Integration and Testing

Authorize.Net API questions and help with your payment integration.

Posts: 1
Registered: ‎05-27-2011

Null Object in UpdateCustomer(Customer customer) from CIM

I am getting a null reference when I try to update the Customer using the CIM code provided as part of the SDK.  I can create customers and modify their Payment Profiles and their Shipping info.  But when ever I try to update the customer like their billing Address it throws this error:


Object reference not set to an instance of an object.

AuthorizeNet at AuthorizeNet.CustomerGateway.UpdateCustomer(Customer customer).


I am using the C# code compiled library in debug mode.  Any pointers to help me fix this bug.  I haven't stepped through the UpdateCustomer function to find out where exactly in the 6 line function it crashes.  but the only thing I can see that could be null is the request.


Thank you,



Posts: 591
Registered: ‎08-21-2009

Re: Null Object in UpdateCustomer(Customer customer) from CIM

What is the actual code that you are running when you get this order?  Are you sure that you are submittin ga valid customer object?

Posts: 6
Registered: ‎08-05-2011

I'm getting the same error

I do a CreateCustomer to get a Customer object. I verified that it does return a Customer object.


If I immediately follow that with an UpdateCustomer, I get a null reference exception (NRE) because the request Profile object in that method is null and the developers did not test for that before using it, thus the NRE.


I don't understand why I can't create an object and then update it immediately without it crashing.


I would like some help with this--how do you get support on this product?

Posts: 7
Registered: ‎08-17-2011

Re: I'm getting the same error

I too would like to get an answer to this... I am getting the same thing... CreateCustomer, then turn around and try and UpdateCustomer... receive error....

Posts: 2
Registered: ‎10-05-2012

Re: I'm getting the same error

This is still an issue as Oct 2012.


Create new Customer, recieve Customer object as return. Add value to the ID field. Execute UpdateCustomer on new customer record, throws NRE.


Has anyone yet figure out why?



Posts: 4,525
Registered: ‎03-08-2010

Re: I'm getting the same error

YYY_GUY, found the problem, you can fix is by download the source and modify it.