cancel
Showing results for 
Search instead for 
Did you mean: 

CIM CustomerPaymentProfileMaskedType

I'm working on a custom CIM integration using C#. Everything is working, but I need the ability to display to our support reps the last 4 digits of the customers CC that is associated with their Customer Profile.

 

I get everything back in the CustomerPaymentProfileMaskedType object and I can visually see Masked Credit Card Number...but cannot get ahold of it to display it back...

 

As an example: 

 

customerProfile.paymentProfiles[0].payment.Item.??? 

 

When I debut...I can see that the payment.Item has the Credit Card Information in it...but I cannot access it otherwise...

 

What am I missing...how can I display back this information.

djdestasio11
Member
2 REPLIES 2
Never mind. I found the answer in another post :) ((AuthorizeDotNet.ArbApiSoap.CreditCardMaskedType)customerProfile.paymentProfiles[0].payment.Item).cardNumber;
djdestasio11
Member

In case anyone stumbles on this also - if you look at the declaration for the item property, it's decalred as an object - it could be either typeof(BankAccountMaskedType) or typeof(CreditCardMaskedType) - so in this case, if you said:

 

 var card = profile.paymentProfile.payment.Item as CreditCardMaskedType;

 

you would then get card.cardNumber, card.expirationDate, card.cardType properties exposed as you would expect.