Skip to content

Commit 40a4626

Browse files
authored
Merge pull request #65 from adkumar3/master
changes for samples, JDK cert,
2 parents 80aa073 + ee0e8eb commit 40a4626

38 files changed

+2488
-761
lines changed

README.md

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,12 +86,20 @@ You do not need to download and build the source to use the SDK but if you want
8686
8787
h. "serverURL" config parameter will take precedence over sendToProduction and sendToAkamai config parameters. By default the "serverURL" configuration is commented out.
8888

89+
i. "enablejdkcert" parameter if set to true then it will read the JKS file specified at keysDirectory location. The file should be of the same name as specified in keyFilename.
90+
91+
j. cacerts this property will be considered only if "enablejdkcert" is set to true. If it is set to true then it means the JKS file is under cacerts folder of the JDK and
92+
it will read the JKS file from cacerts.
93+
94+
k. Please refer to the accompanying documentation for the other optional properties that you may wish to specify.
95+
8996
i. "allowRetry" config parameter will only work for HttpClient. Set allowRetry config parameter to "true" to enable retry mechanism and set merchant specific values for the retry.
9097
Set integer values for config parameter numberOfRetries & retryInterval. Retry Interval is time delay for next retry in seconds. number of retry parameter should be set between
9198
1 to 5 any other value will throw an Error Message. Refer to the "Retry Pattern" section below.
9299
93100
j. Please refer to the accompanying documentation for the other optional properties that you may wish to specify.
94101

102+
95103

96104
4. Build this project using Maven.
97105

@@ -111,38 +119,47 @@ You do not need to download and build the source to use the SDK but if you want
111119

112120
We have two ways to test, One is using maven tool and other is to download the zip and use scripts to test.
113121

122+
114123
1.) Unzip the downloaded zip file into a directory of your choice. It will create a directory called
115124
cybersource-sdk-java-master.
125+
* If in the Request, a key called "_has_escapes" is present and is set
126+
* to "1", we will not escape the special characters. Basically, the
127+
* merchant is saying that they have escaped the characters themselves.
128+
* This might prove useful for more advanced users of the Basic client.
129+
130+
Note: The Script will take Service_name as program argument. Service Name can
131+
be auth, auth_reversal, capture, sale, emv_auth, credit. If no argument is passed the script
132+
will terminate the program.
116133

117134
a. TESTING THE NAME-VALUE PAIR SAMPLE
118135
. Go to the cybersource-sdk-java-master/sample/nvp directory.
119136
. Use compileSample scripts to create classes directory.As it is not included in SDK.
120137
. Then at a command prompt, type this line:
121-
Windows runSample.bat
122-
Unix or Linux runSample.sh
138+
Windows runSample.bat <service_name>
139+
Unix or Linux runSample.sh <service_name>
123140

124141
If JAVA_HOME is defined, the script uses <JAVA_HOME>/bin/java. Otherwise, it uses
125142
whatever java is in the path.
126143
If the client is installed correctly, the requests and replies for a credit card authorization
127144
and a follow-on capture appear.
128145

129-
. If you make any changes to the AuthCaptureSample.java sample, you
146+
. If you make any changes to the RunSample.java sample, you
130147
must rebuild the sample before using it. Use the compileSample batch file or
131148
shell script provided in the sample directory.
132149
133150
b. TESTING THE XML SAMPLE
134151
. Go to the cybersource-sdk-java-master/sample/xml directory.
135152
. Use compileSample scripts to create classes directory.As it is not included in SDK.
136153
. At a command prompt, type this line:
137-
Windows runSample.bat
138-
Unix or Linux runSample.sh
154+
Windows runSample.bat <Service_name>
155+
Unix or Linux runSample.sh <service_name>
139156
140157
If JAVA_HOME is defined, the script uses <JAVA_HOME>/bin/java. Otherwise, it uses
141158
whatever java is in the path.
142159
If the client is installed correctly, the requests and replies for a credit card authorization
143160
and a follow-on capture appear.
144161

145-
. If you make any changes to the AuthSample.java sample, you
162+
. If you make any changes to the RunSample.java sample, you
146163
must rebuild the sample before using it. Use the compileSample batch file or
147164
shell script provided in the sample directory.
148165

java/pom.xml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="UTF-8"?>
22
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
3-
3+
44
<modelVersion>4.0.0</modelVersion>
55
<parent>
66
<groupId>org.sonatype.oss</groupId>
@@ -33,13 +33,13 @@
3333
<email>[email protected]</email>
3434
</developer>
3535
</developers>
36-
36+
3737
<properties>
3838
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
3939
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
4040
</properties>
4141
<packaging>jar</packaging>
42-
42+
4343
<profiles>
4444
<profile>
4545
<id>release-artifacts</id>
@@ -172,7 +172,7 @@
172172
</build>
173173
</profile>
174174
</profiles>
175-
175+
176176
<dependencies>
177177
<dependency>
178178
<groupId>junit</groupId>
@@ -185,11 +185,11 @@
185185
<artifactId>commons-httpclient</artifactId>
186186
<version>3.1</version>
187187
<exclusions>
188-
<exclusion>
189-
<groupId>commons-logging</groupId>
190-
<artifactId>commons-logging</artifactId>
191-
</exclusion>
192-
</exclusions>
188+
<exclusion>
189+
<groupId>commons-logging</groupId>
190+
<artifactId>commons-logging</artifactId>
191+
</exclusion>
192+
</exclusions>
193193
</dependency>
194194
<dependency>
195195
<groupId>org.bouncycastle</groupId>
@@ -200,14 +200,14 @@
200200
<groupId>org.apache.ws.security</groupId>
201201
<artifactId>wss4j</artifactId>
202202
<version>1.6.19</version>
203-
</dependency>
203+
</dependency>
204204
<dependency>
205205
<groupId>org.apache.commons</groupId>
206206
<artifactId>commons-lang3</artifactId>
207207
<version>3.4</version>
208208
</dependency>
209209
<dependency>
210-
<groupId>org.mockito</groupId>
210+
<groupId>org.mockito</groupId>
211211
<artifactId>mockito-all</artifactId>
212212
<version>1.10.19</version>
213213
<scope>test</scope>

0 commit comments

Comments
 (0)