0.35
authorIvan Kohler <ivan@freeside.biz>
Tue, 9 Feb 2016 22:44:04 +0000 (14:44 -0800)
committerIvan Kohler <ivan@freeside.biz>
Tue, 9 Feb 2016 22:44:04 +0000 (14:44 -0800)
Changes
CreditCard.pm
t/test.t

diff --git a/Changes b/Changes
index 5fa7daf..215c517 100644 (file)
--- a/Changes
+++ b/Changes
@@ -1,6 +1,8 @@
 Revision history for Perl extension Business::CreditCard.
 
-0.35  unreleased
+0.35  Tue Feb  9 14:43:38 PST 2016
+        - Fix bug identifying 49* Visa cards introduced in 0.34, patch from
+          Ed J, thanks!
         - doc: Clarify processing agreements don't apply to Canada
 
 0.34  Fri Feb  5 07:24:00 PST 2016
index 0ef0110..8d5dcbb 100644 (file)
@@ -5,7 +5,7 @@ use vars qw( @ISA $VERSION $Country );
 
 @ISA = qw( Exporter );
 
-$VERSION = "0.35_01";
+$VERSION = "0.35";
 
 $Country = 'US';
 
@@ -221,7 +221,7 @@ sub cardtype {
       || $number =~ /^564182[\dx]{10}([\dx]{2,3})?$/o
       || $number =~ /^6(3(33[0-4][0-9])|759[0-9]{2})[\dx]{10}([\dx]{2,3})?$/o;
     #redunant with above, catch 49* that's not Switch
-    return "VISA card" if $number =~ /^4[\dx]{12-18}$/o;
+    return "VISA card" if $number =~ /^4[\dx]{12,18}$/o;
 
     #return "Diner's Club/Carte Blanche"
     #  if $number =~ /^3(0[0-59]|[68][\dx])[\dx]{11}$/o;
index a885a48..5a4cdec 100644 (file)
--- a/t/test.t
+++ b/t/test.t
@@ -15,6 +15,7 @@ sub test_card_identification {
                 '5512345678901234' =>   'MasterCard',
                 '2512345678901234' => 'MasterCard',
                 '4123456789012' =>      'VISA card',
+                '4929492492497' =>      'VISA card',
                 '4512345678901234' =>   'VISA card',
                 '341234567890123' =>    'American Express card',
                 '371234567890123' =>    'American Express card',