Press n or j to go to the next uncovered block, b, p or k for the previous block.
| 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 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 | 1x 1x 1x 1x 45x 45x 9x 9x 9x 9x 45x 12x 12x 12x 12x 12x 12x 45x 45x 12x 12x 12x 12x 1x |
const dataObjectsSchema = {
'00': {
name: 'Payload Format Indicator',
presence: 'M',
},
'01': {
name: 'Point of Initiation Method',
presence: 'O',
},
'02-51': {
name: 'Merchant Account Information',
presence: 'M',
},
'52': {
name: 'Merchant Category Code',
presence: 'M',
},
'53': {
name: 'Transaction Currency',
presence: 'M',
},
'54': {
name: 'Transaction Amount',
presence: 'C',
},
'55': {
name: 'Tip or Convenience Indicator',
presence: 'O',
},
'56': {
name: 'Value of Convenience Fee Fixed',
presence: 'C',
},
'57': {
name: 'Value of Convenience Fee Percentage',
presence: 'C',
},
'58': {
name: 'Country Code',
presence: 'M',
},
'59': {
name: 'Merchant Name',
presence: 'M',
},
'60': {
name: 'Merchant City',
presence: 'M',
},
'61': {
name: 'Postal Code',
presence: 'O',
},
'62': {
name: 'Additional Data Field Template',
presence: 'O',
},
'63': {
name: 'CRC',
presence: 'M',
},
'64': {
name: 'Merchant Information— Language Template',
presence: 'O',
},
'65-79': {
name: 'RFU for EMVCo',
presence: 'O',
},
'80-99': {
name: 'Unreserved Templates',
presence: 'O',
},
};
const dataObjectsSchemaSubData = {
'00': {
name: 'Global Unique Identifier',
presence: 'M',
},
'01': {
name: 'Merchat PAN',
presence: 'O',
},
'02': {
name: 'Merchant ID',
presence: 'M',
},
'03': {
name: 'Merchant Criteria',
presence: 'M',
},
};
const dataObjectsAdditiolanFields = {
'01': {
name: 'Bill Number',
presence: 'O',
},
'02': {
name: 'Mobile Number',
presence: 'O',
},
'03': {
name: 'Store Label',
presence: 'O',
},
'04': {
name: 'Loyalty Number',
presence: 'O',
},
'05': {
name: 'Reference Label',
presence: 'O',
},
'06': {
name: 'Customer Label',
presence: 'O',
},
'07': {
name: 'Terminal Label',
presence: 'O',
},
'08': {
name: 'Purpose of Transaction',
presence: 'O',
},
'09': {
name: 'Additional Consumer Data Request',
presence: 'O',
},
'10-49': {
name: 'RFU for EMVCo',
presence: 'O',
},
'50-99': {
name: 'Payment System specific templates.',
presence: 'O',
},
};
const dataObjectsPaymentSpecificTemplate = {
'00': {
name: 'Globally Unique Identifier',
presence: 'O',
},
'01-99': {
name: 'Payment System specific',
presence: 'O',
},
}
function getDataObject(stringId) {
let dataObject = dataObjectsSchema[stringId];
if (!dataObject) {
const id = parseInt(stringId);
(id >= 2 && id <= 51) && (dataObject = dataObjectsSchema['02-51']);
(id >= 65 && id <= 79) && (dataObject = dataObjectsSchema['65-79']);
(id >= 80 && id <= 99) && (dataObject = dataObjectsSchema['80-99']);
}
return dataObject;
}
function getDataObjectSubData(stringId) {
let dataObject = dataObjectsSchemaSubData[stringId];
if (!dataObject) {
}
return dataObject;
}
function getDataObjectAdditionalFields(stringId) {
let dataObject = dataObjectsAdditiolanFields[stringId];
Iif (!dataObject) {
const id = parseInt(stringId);
(id >= 10 && id <= 49) && (dataObject = dataObjectsAdditiolanFields['10-49']);
(id >= 50 && id <= 99) && (dataObject = dataObjectsAdditiolanFields['50-99']);
}
return dataObject;
}
function getDataObjectPaymentSpecifi(stringId) {
let dataObject = dataObjectsPaymentSpecificTemplate[stringId];
if (!dataObject) {
const id = parseInt(stringId);
(id >= 1 && id <= 99) && (dataObject = dataObjectsPaymentSpecificTemplate['01-99']);
}
return dataObject;
}
function getDataObjectName(stringId) {
const dataObject = getDataObject(stringId);
return dataObject ? dataObject.name : undefined;
}
function getDataObjectNameSubData(stringId) {
const dataObject = getDataObjectSubData(stringId);
return dataObject ? dataObject.name : undefined;
}
function getDataObjectAdditionalFieldsName(stringId) {
const dataObject = getDataObjectAdditionalFields(stringId);
return dataObject ? dataObject.name : undefined;
}
function getDataObjectNamePaymentSpecific(stringId) {
const dataObject = getDataObjectPaymentSpecifi(stringId);
return dataObject ? dataObject.name : undefined;
}
module.exports = {
getDataObjectName,
getDataObjectNameSubData,
getDataObjectAdditionalFieldsName,
getDataObjectNamePaymentSpecific
}; |