- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Create new customer using SDK
I am planning on using the SDK to integrate with AuthNet. I am unable to find documentation or samples on the SDK.
Where can I find this? For instance. I am trying to create a new customer with a billing address. This is how I am doing it.
AuthorizeNet.
CustomerGateway gate = new AuthorizeNet.CustomerGateway(loginId, transactionKey);
var response = gate.CreateCustomer(null, uniqueId);
if (response != null)
{
AuthorizeNet.
Customer cust = gate.GetCustomer(response.ProfileID);
AuthorizeNet.
Address addr = new AuthorizeNet.Address();
addr.Street =
string.Format("{0}, {1}", address1, address2);
addr.City = city;
addr.State = state;
addr.Zip = zip;
addr.Country =
"USA";
if (cust.BillingAddress == null)
{
cust.BillingAddress = addr;
}
if (gate.UpdateCustomer(cust))
{
}
}
When I UpdateCustomer the code breaks on this line (line 533) in CustomerGateway.UpdateCustomer() method.
req.profile.customerProfileId = customer.ProfileID;
The profile property of the request is null in this instance.
Am I using the correct method calls here? I doubt that I am.
Any help would be appreciated.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Has this issue been resolved?
I am encountering the exact same error.
- Peter
07-30-2011 11:58 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm getting same error... a little support would be nice...
11-04-2011 07:35 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Insert the following code at line 532:
req.profile = new customerProfileExType();
02-29-2012 03:56 PM
