Credit card validation in WebSphere Commerce

When an order is submitted, the CheckCCNumberCmd command is automatically called. This command checks information in the CCCHECK table to determine the validity of the credit card number. This table is empty by default and if no entry is found in the table, the basic credit card error checking command DoLuhnCheckCmd is started.

Note: To apply more rules for credit card validation, contact your credit card center and confirm the rules.

Next, we can populate the CCCHECK table. The following table provides an example data:

Table 1. Credit card: Example data
Card type Card number prefix Card number length
Visa 4xxxxxxx 13, 16
MasterCard 51xxxxx - 55xxxx 16
American Express 34xxxx, 37xxxxx 15

Assuming this example data is correct, insert the following rows into the CCCHECK table for the card types listed in Table 1:

Note: