cardtype(
cardtype(
THECARD
)

The cardtype( function returns the credit card type (American Express, Visa, MasterCard or Discover).

Parameters

This function has one parameter:

thecard – credit card number (may include dashes)

Description

This function returns the credit card type (American Express, Visa, MasterCard or Discover).

    cardtype("4566-3762-9876-1298") ☞ Visa
    cardtype("3762-4566-9876-1298") ☞ American Express

The result will be an empty string if the number does not match a card type.

Note: This function is equivalent to:

    stripchar(replacemultiple(thecard[1,1],"3,4,5,6",
      "American Express,Visa,MasterCard,Discover",","),"AZaz  ")

See Also

History

Version | Status | Notes
10.0 | No Change | Carried over from Panorama 6.0.