projects
/
Business-CreditCard.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b37ef19
)
added documentation on cardtype() return values
author
ivan
<ivan>
Wed, 9 Jun 2004 04:51:17 +0000
(
04:51
+0000)
committer
ivan
<ivan>
Wed, 9 Jun 2004 04:51:17 +0000
(
04:51
+0000)
Changes
patch
|
blob
|
history
CreditCard.pm
patch
|
blob
|
history
diff --git
a/Changes
b/Changes
index
6af9922
..
0feb517
100644
(file)
--- a/
Changes
+++ b/
Changes
@@
-3,6
+3,8
@@
Revision history for Perl extension Business::CreditCard.
0.28 unreleased
- added Switch and Solo cards, patch from Max Becker
- added proper Changes file
0.28 unreleased
- added Switch and Solo cards, patch from Max Becker
- added proper Changes file
+ - added documentation on cardtype() return values from
+ tmurray@agronomy.org (closes: cpan #3330)
0.27 20 Jan 2002
- small typo for amex cards
0.27 20 Jan 2002
- small typo for amex cards
diff --git
a/CreditCard.pm
b/CreditCard.pm
index
0006378
..
9c15087
100644
(file)
--- 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
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,
The generate_last_digit() subroutine computes and returns the last
digit of the card given the preceding digits. With a 16-digit card,