Reply
Member
Posts: 6
Registered: ‎06-10-2010

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.

Member
Posts: 6
Registered: ‎06-10-2010

Re: CIM CustomerPaymentProfileMaskedType

Never mind. I found the answer in another post :) ((AuthorizeDotNet.ArbApiSoap.CreditCardMaskedType)customerProfile.paymentProfiles[0].payment.Item).cardNumber;
Member
Posts: 6
Registered: ‎03-19-2011

Re: CIM CustomerPaymentProfileMaskedType

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.