From 989cca9a537ca5e1e92aae93d9c55503f54b86ef Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Tue, 9 Feb 2016 14:44:04 -0800 Subject: [PATCH] 0.35 --- Changes | 4 +++- CreditCard.pm | 4 ++-- t/test.t | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Changes b/Changes index 5fa7daf..215c517 100644 --- 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 diff --git a/CreditCard.pm b/CreditCard.pm index 0ef0110..8d5dcbb 100644 --- a/CreditCard.pm +++ b/CreditCard.pm @@ -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; diff --git a/t/test.t b/t/test.t index a885a48..5a4cdec 100644 --- 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', -- 2.11.0