It's odd that the API shows the responce
creditCard | Contains credit card payment information for the customer profile. | |
cardNumber | The customer’s credit card number. All sensitive payment information in the output is masked. | 13 to 16 digits. |
But the responce has it as Item.
- paymentProfiles {AuthorizeNet.Api.Contracts.V1.customerPaymentProfileMaskedType[1]} AuthorizeNet.Api.Contracts.V1.customerPaymentProfileMaskedType[]
- [0] {AuthorizeNet.Api.Contracts.V1.customerPaymentProfileMaskedType} AuthorizeNet.Api.Contracts.V1.customerPaymentProfileMaskedType
+ billTo {AuthorizeNet.Api.Contracts.V1.customerAddressType} AuthorizeNet.Api.Contracts.V1.customerAddressType
customerPaymentProfileId "2501154857" string
customerProfileId null string
customerType individual AuthorizeNet.Api.Contracts.V1.customerTypeEnum
customerTypeSpecified false bool
defaultPaymentProfile false bool
defaultPaymentProfileSpecified false bool
driversLicense null AuthorizeNet.Api.Contracts.V1.driversLicenseMaskedType
- payment {AuthorizeNet.Api.Contracts.V1.paymentMaskedType} AuthorizeNet.Api.Contracts.V1.paymentMaskedType
- Item {AuthorizeNet.Api.Contracts.V1.creditCardMaskedType} object {AuthorizeNet.Api.Contracts.V1.creditCardMaskedType}
cardArt null AuthorizeNet.Api.Contracts.V1.cardArt
cardNumber "XXXX1111" string
cardType "Visa" string
expirationDate "XXXX" string
and when you call:
string ppId = response.profile.paymentProfiles[0].customerPaymentProfileId;
string ccnum = response.profile.paymentProfiles[0].payment.Item.cardNumber;
Severity Code Description Project File Line Suppression State
Error CS1061 'object' does not contain a definition for 'cardNumber' and no extension method 'cardNumber' accepting a first argument of type 'object' could be found