Hi,
i have trying to update the billing address and credit card information using the below Code in c#.
if (gateway.IsNull()) { SetGateway(); } PaymentProfile oldprofile = gateway.GetCustomer(profileID).PaymentProfiles.Where(i=>i.ProfileID.Equals(paymentProfileID)).First(); oldprofile.BillingAddress = billTo; oldprofile.CardCode = cardCode; oldprofile.CardExpiration = string.Format("{1}-{0}", expirationMonth, expirationYear); oldprofile.CardNumber = cardNumber; return gateway.UpdatePaymentProfile(profileID, oldprofile);
But, upong UpdatePaymentProfile i get a object reference Exception. can someone please point me in the right direction?
Solved! Go to Solution.
โ06-08-2012 04:15 AM
Hey amitthakkar2228,
Thanks for bringing this up. It looks like there's a bug in the SDK. I've passed this on to our developers for them to have a look at.
Thanks,
Michelle
Developer Community Manager
โ06-15-2012 03:14 PM
okay, if i just enter the billing address it gives me an error E00029 - Payment information is required.
Now , how do i enter the payment information?
i believe we need to pass a PaymentEXType, but upon creating new PaymentProfile instance it just allows me to create a maskedType. that gives me a object reference exception.
i have just added the Authorize.Net DLL in my project and am creating a library for performing maintenance activities like adding, deleting and updating credit and customer information.
Please help.
โ06-08-2012 06:04 AM
Hey amitthakkar2228,
Thanks for bringing this up. It looks like there's a bug in the SDK. I've passed this on to our developers for them to have a look at.
Thanks,
Michelle
Developer Community Manager
โ06-15-2012 03:14 PM
Yes, i figured the same and downloaded the source and fixed it. Thank you for looking into it.
โ06-16-2012 11:49 AM