package Business::CreditCard;
-# Jon Orwant, <orwant@media.mit.edu>
-#
-# Copyright 1995,1996,1997 Jon Orwant
-# Copyright 2001-2006 Ivan Kohler
-# All rights reserved.
-# This program is free software; you can redistribute it and/or
-# modify it under the same terms as Perl itself.
-#
-# Current maintainer is Ivan Kohler <ivan-business-creditcard@420.am>.
-# Please don't bother Jon with emails about this module.
-
-require 5;
-
require Exporter;
use vars qw( @ISA $VERSION $Country );
@ISA = qw( Exporter );
-$VERSION = "0.30";
+$VERSION = "0.31";
$Country = 'US';
Switch
Solo
China Union Pay
+ Laser
Unknown
"Not a credit card" is returned on obviously invalid data values.
be treated as in a different country by setting
C<$Business::OnlinePayment::Country> to your two-letter country code. This
is probably what you want to determine if you accept the card, or which
-merchant agreement is is processed through.
+merchant agreement it is processed through.
You can also set C<$Business::OnlinePayment::Country> to a false value such
as the empty string to return the "base" card type. This is probably only
=back
-=item
+=head1 NOTE ON INTENDED PURPOSE
+
+This module is for verifying I<real world> B<credit cards>. It is B<NOT> a
+pedantic implementation of the ISO 7812 standard, a general-purpose LUHN
+implementation, or intended for use with "creditcard-like account numbers".
=head1 AUTHOR
Max Becker <Max.Becker@firstgate.com> contributed support for additional card
types. Lee also contributed a working test.pl.
+=head1 COPYRIGHT AND LICENSE
+
+Copyright (C) 1995,1996,1997 Jon Orwant
+Copyright (C) 2001-2006 Ivan Kohler
+Copyright (C) 2007 Freeside Internet Services, Inc.
+
+This library is free software; you can redistribute it and/or modify
+it under the same terms as Perl itself, either Perl version 5.8.8 or,
+at your option, any later version of Perl 5 you may have available.
+
=head1 SEE ALSO
L<Business::CreditCard::Object> is a wrapper around Business::CreditCard
return "China Union Pay"
if $number =~ /^622[\dx]{13}$/o;
+ return "Laser"
+ if $number =~ /^6(304|7(06|09|71))[\dx]{12,15}$/o;
+
return "Unknown";
}