-
Notifications
You must be signed in to change notification settings - Fork 77
/
Copy pathConfiguration.java
90 lines (69 loc) · 3.04 KB
/
Configuration.java
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
package Data;
import java.util.Properties;
public class Configuration {
public static Properties getMerchantDetails() {
Properties props = new Properties();
// HTTP_Signature = http_signature and JWT = jwt
props.setProperty("authenticationType", "http_signature");
props.setProperty("merchantID", "testrest");
props.setProperty("runEnvironment", "apitest.cybersource.com");
props.setProperty("requestJsonPath", "src/main/resources/request.json");
// MetaKey Parameters
props.setProperty("portfolioID", "");
props.setProperty("useMetaKey", "false");
// JWT Parameters
props.setProperty("keyAlias", "testrest");
props.setProperty("keyPass", "testrest");
props.setProperty("keyFileName", "testrest");
// P12 key path. Enter the folder path where the .p12 file is located.
props.setProperty("keysDirectory", "src/main/resources");
// HTTP Parameters
props.setProperty("merchantKeyId", "08c94330-f618-42a3-b09d-e1e43be5efda");
props.setProperty("merchantsecretKey", "yBJxy6LjM2TmcPGu+GaJrHtkke25fPpUX+UY6/L/1tE=");
// Logging to be enabled or not.
props.setProperty("enableLog", "true");
// Log directory Path
props.setProperty("logDirectory", "log");
props.setProperty("logFilename", "cybs");
// Log file size in KB
props.setProperty("logMaximumSize", "5M");
// OAuth related properties.
props.setProperty("enableClientCert", "false");
props.setProperty("clientCertDirectory", "src/main/resources");
props.setProperty("clientCertFile", "");
props.setProperty("clientCertPassword", "");
props.setProperty("clientId", "");
props.setProperty("clientSecret", "");
/*
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.
*/
props.setProperty("jwePEMFileDirectory", "src/main/resources/NetworkTokenCert.pem");
return props;
}
public static Properties getAlternativeMerchantDetails() {
Properties props = new Properties();
// HTTP_Signature = http_signature and JWT = jwt
props.setProperty("authenticationType", "http_signature");
props.setProperty("merchantID", "testrest_cpctv");
props.setProperty("runEnvironment", "apitest.cybersource.com");
props.setProperty("requestJsonPath", "src/main/resources/request.json");
// JWT Parameters
props.setProperty("keyAlias", "testrest_cpctv");
props.setProperty("keyPass", "testrest_cpctv");
props.setProperty("keyFileName", "testrest_cpctv");
// P12 key path. Enter the folder path where the .p12 file is located.
props.setProperty("keysDirectory", "src/main/resources");
// HTTP Parameters
props.setProperty("merchantKeyId", "964f2ecc-96f0-4432-a742-db0b44e6a73a");
props.setProperty("merchantsecretKey", "zXKpCqMQPmOR/JRldSlkQUtvvIzOewUVqsUP0sBHpxQ=");
// Logging to be enabled or not.
props.setProperty("enableLog", "true");
// Log directory Path
props.setProperty("logDirectory", "log");
props.setProperty("logFilename", "cybs");
// Log file size in KB
props.setProperty("logMaximumSize", "5M");
return props;
}
}