日期:2009-10-13  浏览次数:21481 次

验证还取决于信用卡的类型。

    '**************************************

    ' Name: Credit Card Mod 10 Validation
    ' Description:This function validates if
    '     a credit card number "appears" to be val
    '     id, depending on the type of card, and a
    '     lso performing a Mod 10 check on the num
    '     bers.
    ' By: Lewis Moten
    '
    '
    ' Inputs:asCardType - Type of credit car
    '     d. (American Express, Discover, Visa, Ma
    '     sterCard)
    anCardNumber - The number appearing On the card. Dashes and spaces are ok. Numbers are stripped from
the data provided.
    '
    ' Returns:Returns a boolean (true/false)
    '     determining if the number appears to be
    '     valid or not.
    '
    'Assumes:The user needs to be able to lo
    '     ok through the code and determine wich s
    '     trings represent the cards. You can eith
    '     er type out the entire card name (i.e. "
    '     American Express") or type in just a let
    '     ter representing the card name (i.e. "a"
    '     )
    '
    'Side Effects:Just because the function
    '     returns that the card is valid, there ar
    '     e several other things that are not bein
    '     g validated.
    Date - make sure the card has Not expired
    Active Account - This script does Not communicate With any banks To determine If the account number is
active
    Authorization - again, this script does Not communicate With any banks To determine If the card has
authorization to purchase a product.
    '
    'Warranty:
&