|
1 | 1 | # CyberSource Simple Order API for Java |
2 | 2 |
|
3 | | -[](https://travis-ci.org/CyberSource/cybersource-sdk-java) |
| 3 | +[](https://travis-ci.org/CyberSource/cybersource-sdk-java) |
4 | 4 |
|
5 | 5 | ## Package Managers |
6 | 6 |
|
@@ -156,24 +156,9 @@ keytool -list -v -keystore <Your_keystore_name>` |
156 | 156 | - The first entry should contain a chain of two certificates - `CyberSourceCertAuth` and <Merchant_ID> with alias name <Merchant_ID> |
157 | 157 | - Second entry should be for `CyberSource_SJC_US` certificate with alias name as CyberSource_SJC_US |
158 | 158 |
|
159 | | -##Troubleshooting |
160 | | -put below block of code to handle the ClientException to print the complete stacktrace. |
161 | | - |
162 | | -try { |
163 | | - Client.runTransaction(requestMap, merchantProperties); |
164 | | -}catch (ClientException e){ |
165 | | - e.getInnerException().printStackTrace(); |
166 | | -} |
167 | | - |
168 | | -## PoolingHttpClientShutdown |
169 | | -In case of PoolingHttpClient Connection, we need to close the connection manager, http client and idle connection cleaner thread when application got shutdown abruptly or gracefully. |
170 | | -If `enabledShutdownHook` is true, then JVM runtime addShutdownHook method will be initialized. |
171 | | -Shutdown Hooks are a special construct that allows developers to plug in a piece of code to be executed when the JVM is shutting down. This comes in handy in cases where we need to do special clean up operations in case the VM is shutting down. |
172 | | -private void addShutdownHook() { |
173 | | - Runtime.getRuntime().addShutdownHook(this.createShutdownHookThread()); |
174 | | - } |
175 | | -createShutdownHookThread will call static shutdown api to close connectionManager, httpClient and IdleCleanerThread. |
176 | | - |
| 159 | +## PoolingHttpClient |
| 160 | + To get more information please refer wiki. |
| 161 | + |
177 | 162 | ## Message Level Encryption |
178 | 163 | CyberSource supports Message Level Encryption (MLE) for Simple Order API. Message level encryption conforms to the SOAP Security 1.0 specification published by the OASIS standards group. |
179 | 164 |
|
@@ -225,10 +210,12 @@ Version Cybersource-sdk-java 6.2.10 (APR,2020) |
225 | 210 | _______________________________ |
226 | 211 |
|
227 | 212 | 1)MerchantConfig Object Caching based on KeyAlias/Merchant Id |
| 213 | + |
228 | 214 | 2)Added PoolingHttpClientConnection implementation |
| 215 | + |
229 | 216 | 3)Changed retry interval from second to millisecond |
230 | | - 4)Added one more request header "v-c-client-computetime" to calculate time taken to send request to cybersource |
231 | 217 |
|
| 218 | + 4)Added one more request header "v-c-client-computetime" to calculate time taken to send request to cybersource |
232 | 219 |
|
233 | 220 | Version Cybersource-sdk-java 6.2.9 (APR,2020) |
234 | 221 | _______________________________ |
@@ -297,23 +284,34 @@ _______________________________ |
297 | 284 | 1) SHA256 changes which are required to signed the request with SHA256. |
298 | 285 |
|
299 | 286 | ## Troubleshooting |
300 | | -- If you get an exception **java.lang.SecurityException: JCE cannot authenticate the provider BC**. This could be because of |
| 287 | +- If you get an exception **`java.lang.SecurityException: JCE cannot authenticate the provider BC`**. This could be because of |
301 | 288 | many reasons. bcprov*.jar is a signed jar if java fails to validate the signature, it throws this exception. Make sure |
302 | 289 | you run below java command to verify this signature. |
303 | | - jarsigner -verify bcprov-jdk15on-1.61.jar |
| 290 | + |
| 291 | + `jarsigner -verify bcprov-jdk15on-1.61.jar` |
| 292 | + |
304 | 293 | when above command fails it says "jar is unsigned. (signatures missing or not parsable)", this could be because of many |
305 | 294 | reasons. e.g |
| 295 | + |
306 | 296 | 1) When we unpack it and include in our own jar file. Including bcprov*.jar separately in the CLASSPATH should solve this issue. |
307 | 297 | 2) May be changes in Oracle jar signer. If using Java SDK 1.6 or 1.7 with cybersource-sdk-java:6.2.7 and higher |
308 | 298 | (ships with org.bouncycastle:bcprov-jdk15on:1.61). Upgrading version to bcprov-jdk15to18-1.63.jar should solve this issue. |
309 | 299 | 3) If you are using some old version of JBOSS and have copied bcprov*.jar under $JBOSS_HOME/server/default/lib/. |
310 | 300 | copying bcprov*.jar in $JBOSS_HOME/server/default/lib/ instead of $JBOSS_HOME/server/servername/lib/ should solve this issue. |
311 | 301 | |
312 | | -- If you get an exception **exception decrypting data - java.security.InvalidKeyException: Illegal key size**. |
| 302 | +- If you get an exception **`exception decrypting data - java.security.InvalidKeyException: Illegal key size`**. |
313 | 303 | It is recommended to download Unlimited Strength Jurisdiction Policy files from Oracle (US_export_policy.jar and local_policy.jar) |
314 | 304 | for appropriate JAVA version. I meant if merchant are using java 6 then download these policy file only for java6. |
315 | 305 | You need to copy security jars (US_export_policy.jar, local_policy.jar) in the $JAVA_HOME/jre/lib/security directory not in $JAVA_HOME/jre/lib/ext/). |
316 | 306 |
|
| 307 | +- Put below block of code to handle the ClientException to print the complete stacktrace. |
| 308 | + |
| 309 | + try{ |
| 310 | + Client.runTransaction(requestMap, merchantProperties); |
| 311 | + }catch (ClientException e){ |
| 312 | + e.getInnerException().printStackTrace(); |
| 313 | + } |
| 314 | + |
317 | 315 | ## Documentation |
318 | 316 | - For more information about CyberSource services, see <http://www.cybersource.com/developers/documentation>. |
319 | 317 | - For all other support needs, see <http://www.cybersource.com/support>. |
|
0 commit comments