[an error occurred while processing this directive]
Forms Processor Advanced Commands
Contents   Index of Commands   Search the Forms Processor Docs   
cc_check Every credit card number conforms to a pattern which matches the credit card type (MasterCard, Visa, etc.). This function performs a mathematical calculation on a credit card number to see if it is in the correct format of the specified card type. If it does not match, then the either the credit card number or the card type were entered incorrectly in the form.

&cc_check ("cardtype","cardnumber");

Example:

# check card number to see if it is 'ok'

if (&cc_check("$card_type","$card_no") ne "ok")

# it's invalid, tell them so

format screen
You submitted an invalid credit card number.
.

else

# it's valid, say so

format screen
You submitted a valid credit card number.
.

endif

See also: Credit Card acceptance form   Secure server documentation [an error occurred while processing this directive]