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

Retrieving the Credit Card Type from the CIM api

[ Edited ]

I need to retrieve the Credit Card Type from a saved Customer Payment Profile. Any ideas on how I can do this?

 

When I retireve a payment profile, there is a field called: "creditcardtype" but it is always null when I look at the value.

 

My assumption was it is null because I did not set the value when I created the profile. I've looked for how to save that data, but when createing a payment profile I have to use either the CreditCardType or SimpleCreditCardType objects to populate the information and neither of these objects contains a field for Credit Card type. So I have 2 questions:

 

1)If I am to set the value myself, where/how do I set it?

 

2)If there is no way to set the value myself, how can retrieve it otherwise?

 

Any help would be greatly appreicated on this matter.

 

Thank you,

Robert Barham

Highlighted
Trusted Contributor
Posts: 451
Registered: ‎08-21-2009

Re: Retrieving the Credit Card Type from the CIM api

Hi Robert,

 

The credit card type is only returned with a createCustomerProfileTransactionResponse as the delimited <directResponse> value in the 52nd field.

 

I do not receive a credit card type element in response to a getCustomerProfileRequest or a getCustomerPaymentProfileRequest. Here are the results that are returned to me:

 

<getCustomerProfileResponse>
-
<messages>
<resultCode>Ok</resultCode>
-
<message>
<code>I00001</code>
<text>Successful.</text>
</message>
</messages>
-
<profile>
<merchantCustomerId>CIM123</merchantCustomerId>
<description>some description</description>
<email>mark@example.com</email>
<customerProfileId>165224</customerProfileId>
-
<paymentProfiles>
<customerPaymentProfileId>160894</customerPaymentProfileId>
-
<payment>
-
<creditCard>
<cardNumber>XXXX1111</cardNumber>
<expirationDate>XXXX</expirationDate>
</creditCard>
</payment>
</paymentProfiles>
</profile>
</getCustomerProfileResponse>

 

<getCustomerPaymentProfileResponse>
-
<messages>
<resultCode>Ok</resultCode>
-
<message>
<code>I00001</code>
<text>Successful.</text>
</message>
</messages>
-
<paymentProfile>
<customerPaymentProfileId>160894</customerPaymentProfileId>
-
<payment>
-
<creditCard>
<cardNumber>XXXX1111</cardNumber>
<expirationDate>XXXX</expirationDate>
</creditCard>
</payment>
</paymentProfile>
</getCustomerPaymentProfileResponse>

 

 

Thank you,

 

Elaine