X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=CreditCard.pm;h=b940f908b330f9638dcc20fd03f9a33487f7375a;hb=6f0ebd80c234fc7c31259ecf69731b0c34ba770e;hp=0006378f95b1259b8324552bc506eeedd320cbf4;hpb=b37ef197c19ef066c2dd3b910d220da26c048f71;p=Business-CreditCard.git diff --git a/CreditCard.pm b/CreditCard.pm index 0006378..b940f90 100644 --- a/CreditCard.pm +++ b/CreditCard.pm @@ -42,8 +42,24 @@ The validate() subroutine returns 1 if the card number provided passes the checksum test, and 0 otherwise. The cardtype() subroutine returns a string containing the type of -card: "MasterCard", "VISA", and so on. My list is not complete; -I welcome additions. +card. My list is not complete; I welcome additions. + +Possible return values are: + + VISA card + MasterCard + Discover card + American Express card + Diner's Club/Carte Blanche + enRoute + JCB + BankCard + Switch + Solo + Unknown + +"Not a credit card" is returned on obviously invalid +data values. The generate_last_digit() subroutine computes and returns the last digit of the card given the preceding digits. With a 16-digit card, @@ -126,7 +142,7 @@ sub cardtype { # BankCards have exactly 16 digits. # # from "Becker, Max" -# It's mostly used in the UK and is either alled "Switch" or "Solo". +# It's mostly used in the UK and is either called "Switch" or "Solo". # Card Type Prefix Length # Switch various 16,18,19 # Solo 63, 6767 16,18,19