real dash not some unicode bs
[Business-CreditCard.git] / CreditCard.pm
index eabc26f..8d5dcbb 100644 (file)
@@ -5,7 +5,7 @@ use vars qw( @ISA $VERSION $Country );
 
 @ISA = qw( Exporter );
 
-$VERSION = "0.34_01";
+$VERSION = "0.35";
 
 $Country = 'US';
 
@@ -83,7 +83,7 @@ Credit card issuers have recently been forming agreements to process cards on
 other networks, in which one type of card is processed as another card type.
 
 By default, Business::CreditCard returns the type the card should be treated as
-in the US and Canada.  You can change this to return the type the card should
+in the US.  You can change this to return the type the card should
 be treated as in a different country by setting
 C<$Business::CreditCard::Country> to your two-letter country code.  This
 is probably what you want to determine if you accept the card, or which
@@ -99,9 +99,9 @@ Here are the currently known agreements:
 
 =item Most Diner's club is now identified as Discover.  (This supercedes the earlier identification of some Diner's club cards as MasterCard inside the US and Canada.)
 
-=item JCB cards in the 3528-3589 range are identified as Discover inside the US and Canada.
+=item JCB cards in the 3528-3589 range are identified as Discover inside the US and territories.
 
-=item China Union Pay cards are identified as Discover cards outside China.
+=item China Union Pay cards are identified as Discover cards in the US, Mexico and most Caribbean countries.
 
 =back
 
@@ -213,7 +213,7 @@ sub cardtype {
       ||   $number =~ /^6011[\dx]{12,15}$/o
       ||   $number =~ /^64[4-9][\dx]{13,16}$/o
       ||   $number =~ /^65[\dx]{14,17}$/o
-      || ( $number =~ /^62[24-68][\dx]{13,16}$/o && $Country =~ /^(US|MX|CU|HT|DO|PR|JM|TT|GP|MQ|BS|BB|LC|CW|AW|VC|VI|GD|AG|DM|KY|KN|SX|TC|MF|VG|BQ|AI|BL|MS)$/oi ) #China Union Pay identified as Discover in US, Mexico and Caribbean
+      || ( $number =~ /^62[24-68][\dx]{13,16}$/o && $Country =~ /^(US|MX|AI|AG|AW|BS|BB|BM|BQ|VG|KY|CW|DM|DO|GD|GP|JM|MQ|MS|BL|KN|LC|VC|MF|SX|TT|TC)$/oi ) #China Union Pay identified as Discover in US, Mexico and Caribbean
       || ( $number =~ /^35(2[89]|[3-8][\dx])[\dx]{12,15}$/o && $Country =~ /^(US|PR|VI|MP|PW|GU)$/oi ); #JCB cards in the 3528-3589 range are identified as Discover in US, Puerto Rico, US Virgin Islands, Northern Mariana Islands, Palau and Guam
 
     return "Switch"
@@ -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;