Craig Votava is an ass
[Business-CreditCard.git] / CreditCard.pm
index dbc6fea..6a9a918 100644 (file)
@@ -1,24 +1,11 @@
 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';
 
@@ -62,6 +49,7 @@ Possible return values are:
   Switch
   Solo
   China Union Pay
+  Laser
   Unknown
 
 "Not a credit card" is returned on obviously invalid data values.
@@ -96,7 +84,7 @@ in the US and Canada.  You can change this to return the type the card should
 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
@@ -112,7 +100,11 @@ Here are the currently known agreements:
 
 =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
 
@@ -129,6 +121,16 @@ Lee Lawrence <LeeL@aspin.co.uk>, Neale Banks <neale@lowendale.com.au> and
 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
@@ -187,6 +189,9 @@ sub cardtype {
     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";
 }