From 8a516644791c909d2d91ccde18f85c69da07e301 Mon Sep 17 00:00:00 2001 From: Andrew Cormick-Dockery Date: Wed, 31 Aug 2016 07:08:31 +0000 Subject: [PATCH] CRM-19283 - Allow contribution forms to recognise new MasterCard 2-series BIN numbers --- templates/CRM/Core/BillingBlock.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/templates/CRM/Core/BillingBlock.js b/templates/CRM/Core/BillingBlock.js index bc06b0a457..1802fb973b 100644 --- a/templates/CRM/Core/BillingBlock.js +++ b/templates/CRM/Core/BillingBlock.js @@ -43,7 +43,7 @@ // Based on http://davidwalsh.name/validate-credit-cards // See also https://en.wikipedia.org/wiki/Credit_card_numbers var card_types = { - 'mastercard': '5[1-5][0-9]{14}', + 'mastercard': '(5[1-5][0-9]{2}|2[3-6][0-9]{2}|22[3-9][0-9]|222[1-9]|27[0-1][0-9]|2720)[0-9]{12}', 'visa': '4(?:[0-9]{12}|[0-9]{15})', 'amex': '3[47][0-9]{13}', 'dinersclub': '3(?:0[0-5][0-9]{11}|[68][0-9]{12})', -- 2.25.1