-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnew-track-parser.js
More file actions
45 lines (27 loc) · 1.14 KB
/
new-track-parser.js
File metadata and controls
45 lines (27 loc) · 1.14 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
var trackParser = function(rawtrack ,callback) {
cardinfo = {
successful : false, /*Checks to see if the parse was successful or not*/
account : null, /*This is the PAN (primary account number)*/
lastName : null, /*This is the last name*/
firstName : null, /*This is the first name*/
expYear : null, /*This is the expiration year*/
expMonth : null, /*This is the expiration month*/
cvv : null /*This is the service code*/
}
// do stuffs
callback(cardinfo)
}
var trackParserSync = function(rawtrack){
cardinfo = {
successful : false, /*Checks to see if the parse was successful or not*/
account : null, /*This is the PAN (primary account number)*/
lastName : null, /*This is the last name*/
firstName : null, /*This is the first name*/
expYear : null, /*This is the expiration year*/
expMonth : null, /*This is the expiration month*/
cvv : null /*This is the service code*/
}
// do stuffs
return cardinfo
}
module.exports = { trackParser, trackParserSync }