Skip to content

Commit

Permalink
feat: updated cb regex
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanskar2001 committed Dec 4, 2024
1 parent 05862b3 commit 7d97bc9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/CardPattern.res
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ let cardPatterns = [
{
issuer: "CartesBancaires",
pattern: %re(
"/^(40[1-3]|40[5-6]|41[3-7]|42[03]|43[4-5]|43[79]|44[28]|45[035-7]|46[0569]|47[479]|48[136]|49[7-9]|50[7]|51[035-9]|52[0-37]|53[0-8]|54[259]|55[3-9]|56[01]|58[15])/"
"/^(401(005|006|581)|4021(01|02)|403550|405936|406572|41(3849|4819|50(56|59|62|71|74)|6286|65(37|79)|71[7])|420110|423460|43(47(21|xq)|50(48|49|50|51|52)|7875|95(09|11|15|39|98)|96(03|18|19|20|22|72))|4424(48|49|50|51|52|57)|448412|4505(19|60)|45(33|56[6-8]|61|62[^3]|6955|7452|7717|93[02379])|46(099|54(76|77)|6258|6575|98[023])|47(4107|71(73|74|86)|72(65|93)|9619)|48(1091|3622|6519)|49(7|83[5-9]|90(0[1-6]|1[0-6]|2[0-3]|3[0-3]|4[0-3]|5[0-2]|68|9[256789]))|5075(89|90|93|94|97)|51(0726|3([0-7]|8[56]|9(00|38))|5214|62(07|36)|72(22|43)|73(65|66)|7502|7647|8101|9920)|52(0993|1662|3718|7429|9227|93(13|14|31)|94(14|21|30|40|47|55|56|[6-9])|9542)|53(0901|10(28|30)|1195|23(4[4-7])|2459|25(09|34|54|56)|3801|41(02|05|11)|50(29|66)|5324|61(07|15)|71(06|12)|8011)|54(2848|5157|9538|98(5[89]))|55(39(79|93)|42(05|60)|4965|7008|88(67|82)|89(29|4[23])|9618|98(09|10))|56(0408|12(0[2-6]|4[134]|5[04678]))|58(17(0[012357]|15|2[14]|3[167]|4[0-7]|5[16]|6[269]|7[3789]|8[2467]|9[017])|55(02|05|77|82)))/"
),
cvcLength: [3],
length: [16, 17, 18, 19],
Expand Down
2 changes: 1 addition & 1 deletion src/CardSchemeComponent.res
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ let make = (~cardNumber, ~paymentType, ~cardBrand, ~setCardBrand) => {
let enabledCardSchemes =
paymentMethodListValue->PaymentUtils.getSupportedCardBrands->Option.getOr([])

let matchedCardSchemes = cardNumber->CardUtils.getAllMatchedCardSchemes
let matchedCardSchemes = cardNumber->CardUtils.clearSpaces->CardUtils.getAllMatchedCardSchemes

let eligibleCardSchemes = CardUtils.getEligibleCoBadgedCardSchemes(
~matchedCardSchemes,
Expand Down

0 comments on commit 7d97bc9

Please sign in to comment.