Skip to content
This repository has been archived by the owner on Sep 24, 2020. It is now read-only.

Added verve card validation #112

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions lib/angular-payments.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,14 @@ angular.module('angularPayments', []);angular.module('angularPayments')
length: [13, 14, 15, 16],
cvcLength: [3],
luhn: true
}, {
type: 'verve',
pattern: /^([506]{3})([0-9]{1,16})$/,
format: defaultFormat,
inputFormat: defaultInputFormat,
length: [19],
cvcLength: [3],
luhn: false
}
];

Expand All @@ -137,7 +145,7 @@ angular.module('angularPayments', []);angular.module('angularPayments')
for (i = 0, len = cards.length; i < len; i++) {

card = cards[i];

if (card.type === type) {
return card;
}
Expand All @@ -152,7 +160,8 @@ angular.module('angularPayments', []);angular.module('angularPayments')
defaultInputFormat: function() { return defaultInputFormat;}
}

}]);angular.module('angularPayments')
}])
;angular.module('angularPayments')


.factory('_Format',['Cards', 'Common', '$filter', function(Cards, Common, $filter){
Expand Down
Loading