Client-Side Credit Card Validation
Learn how to enable client-side credit card validation and automatic detection of credit card types to ensure data integrity and authenticity on the Payment Page.
Credit Card Validation
When you enable the client-side credit card validation via the Enable client-side validation check box, the following checks are performed as user enters a credit card number on the Payment Page:
-
Does the entered number match issuer's pattern? For example, if the card number begins with "34" or "37", then the card is an AMEX and therefore must be 15 characters in length. If the card number beings with "4", then the card is a VISA, and the length must contain between 13 and 16 characters.
-
Does the number checksum? Credit card numbers are validated using the Luhn Algorithm for data integrity and authenticity. For example, an input credit card number must checksum to make it an valid AMEX card number. It cannot be random 13 numbers that begins with "34".
-
Does the CVV value only include numbers? The CVV value must only contain numbers.
-
Do all the required fields have values?
You can optionallly specify custom error messages for the validation errors. Use the variable, #fieldName , in the error message to include the missing required field name. For example, "Please enter a valid #fieldName to continue." #fieldName can only be used in the Required Field Not Completed type error message.
Automatic Detection of Credit Card Type
When you select the Enable automatic credit card type detection check box, the credit card type is automatically identified based on user's entry. The credit card type is automatically selected as the user enters a credit card number on the Payment Page, and the credit card logo is displayed in the foreground. Users cannot manually select the credit card type.
Supported credit card types are AMEX, Visa, Discover, MasterCard, JCB, and Diners Club.
If a user enters a credit card number of an unsupported or unrecognized card type, an error message will be displayed.
Note that with the automatic credit card type detection feature enabled, the following exceptions apply:
-
JCB card numbers will be detected as a Discover card if the card type JCB is not enabled for the configured Payment Page.
-
Diners Club card numbers will be detected as a Discover card if the card type Diners Club is not enabled for the configured Payment Page.