X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=CreditCard.pm;h=6a9a91891a2c9ed8ce3b64c3d11ddc699501f694;hb=4c810fa50a5a0d40c54a7ee0b48bfd23c4bde1b6;hp=dbc6feaa86aa1e545e19612bd82dd8d926227f9b;hpb=f08d05d2c88ba79b1bcb9b740837a87992b0b159;p=Business-CreditCard.git diff --git a/CreditCard.pm b/CreditCard.pm index dbc6fea..6a9a918 100644 --- a/CreditCard.pm +++ b/CreditCard.pm @@ -1,24 +1,11 @@ package Business::CreditCard; -# Jon Orwant, -# -# 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 . -# 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 B. It is B 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 , Neale Banks and Max Becker 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 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"; }