|
41 | 41 | import java.util.regex.Matcher; |
42 | 42 | import java.util.regex.Pattern; |
43 | 43 | import javax.net.ssl.*; |
44 | | - |
45 | 44 | import com.google.gson.Gson; |
46 | 45 | import org.apache.logging.log4j.Logger; |
47 | 46 | import com.cybersource.authsdk.core.Authorization; |
@@ -267,6 +266,8 @@ public Request authenticate(Route route, Response response) throws IOException { |
267 | 266 | } |
268 | 267 |
|
269 | 268 | this.merchantConfig = merchantConfig; |
| 269 | + // RetryInterceptor.retryDelay = merchantConfig.getRetryDelay(); |
| 270 | + // RetryInterceptor.retryEnabled = merchantConfig.isRetryEnabled(); |
270 | 271 | } |
271 | 272 |
|
272 | 273 | /** |
@@ -1286,12 +1287,12 @@ public <T> T handleResponse(Response response, Type returnType) throws ApiExcept |
1286 | 1287 | public Call buildCall(String path, String method, List<Pair> queryParams, Object body, |
1287 | 1288 | Map<String, String> headerParams, Map<String, Object> formParams, String[] authNames, |
1288 | 1289 | ProgressRequestBody.ProgressRequestListener progressRequestListener) throws ApiException { |
1289 | | - callAuthenticationHeader(method, path, body, queryParams); |
| 1290 | + callAuthenticationHeader(method, path, body, queryParams); |
1290 | 1291 |
|
1291 | | - if(merchantConfig.getEnableClientCert()) |
1292 | | - { |
1293 | | - addClientCertToKeyStore(); |
1294 | | - } |
| 1292 | + if(merchantConfig.getEnableClientCert()) |
| 1293 | + { |
| 1294 | + addClientCertToKeyStore(); |
| 1295 | + } |
1295 | 1296 |
|
1296 | 1297 | if (acceptHeader != null && !acceptHeader.isEmpty()) { |
1297 | 1298 | String defaultAcceptHeader = "," + headerParams.get("Accept"); |
@@ -1439,7 +1440,6 @@ public Request buildRequest(String path, String method, List<Pair> queryParams, |
1439 | 1440 | Gson gson = new Gson(); |
1440 | 1441 | String jsonString = json.serialize(body); |
1441 | 1442 | formParams = gson.fromJson(jsonString, HashMap.class); |
1442 | | - while (formParams.values().remove(null)); |
1443 | 1443 | reqBody = buildRequestBodyFormEncoding(formParams); |
1444 | 1444 | } else if ("multipart/form-data".equals(contentType)) { |
1445 | 1445 | reqBody = buildRequestBodyMultipart(formParams); |
@@ -1667,7 +1667,6 @@ public java.security.cert.X509Certificate[] getAcceptedIssuers() { |
1667 | 1667 | catch (IOException | CertificateException | NoSuchAlgorithmException | KeyStoreException | KeyManagementException | UnrecoverableKeyException ex) { |
1668 | 1668 |
|
1669 | 1669 | } |
1670 | | - |
1671 | 1670 | } |
1672 | 1671 |
|
1673 | 1672 | /** |
|
0 commit comments