cancel
Showing results for 
Search instead for 
Did you mean: 

CIM - Card code required

I am using CIM hosted form. I need to make the card code required. I made the card code required on the Payment Form - Fields page. When I try to add a credit card leaving the Card Code blank I get the following error:

 

This transaction has been declined.

 

After this, I enter the card code and then I get this error:

 

A duplicate transaction has been submitted.

 

This messages are not very informative. Is there any way to really make the card cord required and show an appropiate message on the form. This happens on both the old and new CIM.

hramos04
Member
3 REPLIES 3

When requesting a token, specify that the card code is required by setting hostedProfileCardCodeRequired to true:

 

In the Java JDK, it's done this way:

 

        SettingType setting3 = new SettingType();
        setting3.setSettingName("hostedProfileCardCodeRequired");
        setting3.setSettingValue("true");

 

        ArrayOfSetting alist = new ArrayOfSetting();
        alist.getSetting().add(setting3);

        GetHostedProfilePageRequest apiRequest = new GetHostedProfilePageRequest();
        apiRequest.setHostedProfileSettings(alist);

 

 

mkienenb
Contributor

After I do this I am unable to add CC on sandbox. Is this setting not available on sandbox. I get the error below: 

 

Declined  (Authorization with the card issuer was successful but the transaction was declined due to a card code mismatch with the card code on file with the card issuing bank based on the settings in the Merchant Interface.)

Are you sure you are doing this on the sandbox and not production?   The sandbox account will accept any card code for me.

 

The only other possibility I can think of is that you are sending the wrong number of digits.   Most card codes are 3 digits, but I think there's one credit card provider that uses four digits (AmEx?).