I am trying to retrieve the Customer Payment Profile, using the GetCustomerProfile api, but I need to get it as a string. But all I am getting is "AuthorizeNet.Api.Contracts.V1.customerPaymentProfileMaskedType[]". Is there anyway to get the payment profile ID number in a string?
Solved! Go to Solution.
05-16-2019 08:46 AM
It is already in the string, you can use this.
getCustomerProfileResponse response = controller.GetApiResponse()
paymentProfileId = response.profile.paymentProfiles.FirstOrDefault().customerPaymentProfileId;
05-17-2019 12:57 AM
It is already in the string, you can use this.
getCustomerProfileResponse response = controller.GetApiResponse()
paymentProfileId = response.profile.paymentProfiles.FirstOrDefault().customerPaymentProfileId;
05-17-2019 12:57 AM
That was it, thank you. I have never used the "FirstOrDefault()" before.
05-17-2019 06:43 AM