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:
- 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>
- 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>
- Rebuild the EAR and restart the server for the validation rule to take effect.
Related Information
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21968913