cancel
Showing results for 
Search instead for 
Did you mean: 

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,

Brent

 

CaptainBli
Member
5 REPLIES 5

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?

Trevor
Administrator Administrator
Administrator

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?

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

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?

 

Thanks.

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