clarify what's in the caribbean according to Discover
authorIvan Kohler <ivan@freeside.biz>
Fri, 5 Feb 2016 15:22:50 +0000 (07:22 -0800)
committerIvan Kohler <ivan@freeside.biz>
Fri, 5 Feb 2016 15:22:50 +0000 (07:22 -0800)
CreditCard.pm

index eabc26f..f7b035f 100644 (file)
@@ -5,7 +5,7 @@ use vars qw( @ISA $VERSION $Country );
 
 @ISA = qw( Exporter );
 
-$VERSION = "0.34_01";
+$VERSION = "0.34_02";
 
 $Country = 'US';
 
@@ -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"