Skip to content

Commit

Permalink
Merge pull request #1 from juspay/rupay_discover_conflict_fix
Browse files Browse the repository at this point in the history
Bumping up Rupay (above Discover)
  • Loading branch information
boazjohn authored Sep 27, 2016
2 parents 7b364d3 + 0a044e6 commit 6e65fc5
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 12 deletions.
2 changes: 1 addition & 1 deletion dist/validator.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "simple-card-validator",
"version": "1.0.6",
"version": "1.0.7",
"description": "Card validation helpers for card number, expiry and CVV.",
"main": "index.js",
"scripts": {
Expand Down
28 changes: 18 additions & 10 deletions src/validator.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,22 +45,30 @@ var cardTypes = [
pattern: /^(5018|5081|5044|5020|5038|603845|6304|6759|676[1-3]|6220|504834|504817|504645)\d*/,
valid_length: [12, 13, 14, 15, 16, 17, 18, 19],
cvv_length: [0, 3]
}, {
name: 'discover',
pattern: /^(6011|622(12[6-9]|1[3-9][0-9]|[2-8][0-9]{2}|9[0-1][0-9]|92[0-5]|64[4-9])|65)/,
valid_length: [16],
cvv_length: [3]
}, {
name: 'rupay',
range: [
[508500, 508999],
[606985, 607984],
[608001, 608100],
[608101, 608500],
[652150, 653149]
[ [508500,508999],
[606985,607384],
[607385,607484],
[607485,607984],
[608001,608100],
[608101,608200],
[608201,608300],
[608301,608350],
[608351,608500],
[652150,652849],
[652850,653049],
[653050,653149]]
],
valid_length: [16],
cvv_length: [3]
},
{
name: 'discover',
pattern: /^(6011|622(12[6-9]|1[3-9][0-9]|[2-8][0-9]{2}|9[0-1][0-9]|92[0-5]|64[4-9])|65)/,
valid_length: [16],
cvv_length: [3]
}
];

Expand Down

0 comments on commit 6e65fc5

Please sign in to comment.