Reply
Member
Posts: 3
Registered: ‎10-21-2020

Code Sample for updating Customer Profile needs improvement

The discussion text says:

------------

Update Customer Payment Profile

Use this function to update a payment profile for an existing customer profile.

Note: If some fields in this request are not submitted or are submitted with a blank value, the values in the original profile are removed. As a best practice to prevent this from happening, call getCustomerPaymentProfileRequest to receive all current information including masked payment information. Change the field or fields that you wish to update, and then reuse all the fields you received, with updates, in a call to updateCustomerPaymentProfileRequest.

-------------

But the example doesn't show anything like reading and re-using the existing data. It just has hard coded values.

https://github.com/AuthorizeNet/sample-code-csharp/blob/master/CustomerProfiles/UpdateCustomerPaymen...

 

Further, it assumes credit card info. If that account happened to have any other kind of payment data, you'd mysteriously lose data every time you updated an address.

It would be very helpul if this code could be updated.

 

In particular, I can't see how to handle tokenMaskedType or payPalType.

Member
Posts: 1
Registered: ‎10-26-2020

Re: Code Sample for updating Customer Profile needs improvement

Thank you so much for the information keep suggesting us such informative post i will recommend this post to others My Gift Card Site