Permalink
Browse files

Fix jcb regex to include wider range of card numbers.

  • Loading branch information...
1 parent f34ffcd commit 7293bda24d23d468aca11ed7cdbacb50ebad0db4 @pjhyett pjhyett committed with Cody Fauser Dec 28, 2009
Showing with 2 additions and 1 deletion.
  1. +1 −0 CHANGELOG
  2. +1 −1 lib/active_merchant/billing/credit_card_methods.rb
View
@@ -1,5 +1,6 @@
= ActiveMerchant CHANGELOG
+* Update JCB rejex to catch all valid PANs [pjhyett]
* Remove old TransaXGateway constant [cody]
* Remove old ProtxGateway constant [cody]
* Remove old BrainTree constant [cody]
@@ -8,7 +8,7 @@ module CreditCardMethods
'discover' => /^(6011|65\d{2})\d{12}$/,
'american_express' => /^3[47]\d{13}$/,
'diners_club' => /^3(0[0-5]|[68]\d)\d{11}$/,
- 'jcb' => /^3528\d{12}$/,
+ 'jcb' => /^35(28|29|[3-8]\d)\d{12}$/,
'switch' => /^6759\d{12}(\d{2,3})?$/,
'solo' => /^6767\d{12}(\d{2,3})?$/,
'dankort' => /^5019\d{12}$/,

0 comments on commit 7293bda

Please sign in to comment.