added documentation on cardtype() return values
[Business-CreditCard.git] / CreditCard.pm
index 0006378..9c15087 100644 (file)
@@ -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,