IBM Support

Tokenized credit card throws error Input exceeds maximum allowed length of 200

Troubleshooting


Problem

Attempts to create a tokenized credit card greater than 200 characters throws the error Input exceeds maximum allowed length of 200 in IBM Call Center for Commerce.

Symptom

The complete error message is:
Input exceeds maximum allowed length of 200 by XX characters: context=HTTP parameter value (Name:ns:scControllerData:CapturePayment.PaymentMethods.PaymentMethod.CreditCardNo), type=_default_

Cause

Additional validation is done by the validation rules for isccs

Diagnosing The Problem

The capture payment screen in the CCC has a limit of 32 characters for the tokenized value that is returned. For this field to accept more than 200 characters, the limit was changed using customization to 1000 characters. However in the non dev mode, when the token was greater than 200 characters, an error was seen.

As per validation rule:


<ValidationRules>
    <Rule id="sc-parameter-value-rule" ruleType="Regex" inputType="HTTPParameterValue" inputName="_default_" maxLength="200" >
        <allowlist>
            <RegularExpression ref="sc-parameter-value-pattern" />
        </allowlist>
    </Rule>
</ValidationRules>

The maxLength in the above rule is limiting the size of the field.

Resolving The Problem

Steps to resolve:

  1. Create an xml file with override validations to increase the maxLength.

    Sample :- 
    <ValidationRules>
        <Rule id="sc-parameter-value-rule" ruleType="Regex" inputType="HTTPParameterValue" inputName="_default_" maxLength="1000" >
            <allowlist>
                <RegularExpression ref="sc-parameter-value-pattern" />
            </allowlist>
        </Rule>
    </ValidationRules>


  2. Add a new entry as below in web.xml.

    <context-param>
            <param-name>scui-validation-rules-file-custom-1</param-name>
            <param-value>/path/to/custom_validationrules.xml::99</param-value>
    </context-param>

  3. Rebuild the EAR and restart the server for the validation rule to take effect.

Related Information

[{"Product":{"code":"SSYLSL","label":"IBM Call Center for Commerce"},"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Component":"--","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"9.4;9.3","Edition":"","Line of Business":{"code":"LOB59","label":"Sustainability Software"}}]

Document Information

Modified date:
16 June 2018

UID

swg21968913