/
Configuration.js
72 lines (57 loc) · 1.96 KB
/
Configuration.js
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
'use strict';
/*
* Merchant configuration properties are taken from Configuration module
*/
// common parameters
const AuthenticationType = 'http_signature';
const RunEnvironment = 'apitest.cybersource.com';
const MerchantId = 'testrest';
// http_signature parameters
const MerchantKeyId = '08c94330-f618-42a3-b09d-e1e43be5efda';
const MerchantSecretKey = 'yBJxy6LjM2TmcPGu+GaJrHtkke25fPpUX+UY6/L/1tE=';
// jwt parameters
const KeysDirectory = 'Resource';
const KeyFileName = 'testrest';
const KeyAlias = 'testrest';
const KeyPass = 'testrest';
//meta key parameters
const UseMetaKey = false;
const PortfolioID = '';
// logging parameters
const EnableLog = true;
const LogFileName = 'cybs';
const LogDirectory = 'log';
const LogfileMaxSize = '5242880'; //10 MB In Bytes
const EnableMasking = true;
/*
PEM Key file path for decoding JWE Response Enter the folder path where the .pem file is located.
It is optional property, require adding only during JWE decryption.
*/
const PemFileDirectory = 'Resource/NetworkTokenCert.pem';
// Constructor for Configuration
function Configuration() {
var configObj = {
'authenticationType': AuthenticationType,
'runEnvironment': RunEnvironment,
'merchantID': MerchantId,
'merchantKeyId': MerchantKeyId,
'merchantsecretKey': MerchantSecretKey,
'keyAlias': KeyAlias,
'keyPass': KeyPass,
'keyFileName': KeyFileName,
'keysDirectory': KeysDirectory,
'useMetaKey': UseMetaKey,
'portfolioID': PortfolioID,
'pemFileDirectory': PemFileDirectory,
'logConfiguration': {
'enableLog': EnableLog,
'logFileName': LogFileName,
'logDirectory': LogDirectory,
'logFileMaxSize': LogfileMaxSize,
'loggingLevel': 'debug',
'enableMasking': EnableMasking
}
};
return configObj;
}
module.exports = Configuration;