-
Notifications
You must be signed in to change notification settings - Fork 47
/
Copy pathConfiguration.js
53 lines (42 loc) · 1.49 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
'use strict'
var CybersourceRestApi = require('cybersource-rest-client');
/*
* If Cybs.json file is not provided Merchant configuration properties are taken from Configuration module
*/
//set the constant values
const MerchantId = "testrest";
const MerchantKeyId = "08c94330-f618-42a3-b09d-e1e43be5efda";
const MerchantSecretKey = "yBJxy6LjM2TmcPGu+GaJrHtkke25fPpUX+UY6/L/1tE=";
const AuthenticationType = "jwt";
//const AuthenticationType = "http_signature";
const KeysDirectory = "Resource";
const KeyFileName = "testrest";
const RunEnvironment = "cybersource.environment.sandbox";
const KeyAlias = "testrest";
const KeyPass = "testrest";
const RequestJsonPath = "Resource\\request.json";
const EnableLog = true;
const LogFileName = "cybs";
const LogDirectory = "../log";
const LogfileMaxSize = "5242880"; //10 MB In Bytes
// Constructor for Configuration
function Configuration() {
var configObj = {
"authenticationType": AuthenticationType,
"merchantID": MerchantId,
"runEnvironment": RunEnvironment,
"requestJsonPath": RequestJsonPath,
"keyAlias": KeyAlias,
"keyPass": KeyPass,
"keyFileName": KeyFileName,
"keysDirectory": KeysDirectory,
"merchantKeyId": MerchantKeyId,
"merchantsecretKey": MerchantSecretKey,
"enableLog": EnableLog,
"logFilename": LogFileName,
"logDirectory": LogDirectory,
"logFileMaxSize": LogfileMaxSize
};
return configObj;
}
module.exports = Configuration;