Skip to content

Commit

Permalink
Amazon Pay Java SDK 3.6.1
Browse files Browse the repository at this point in the history
  • Loading branch information
Harshika Agarwal committed Aug 23, 2019
1 parent e3c3ba1 commit a68fafc
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 7 deletions.
Binary file modified dist/amazon-pay-3.6.1.jar
Binary file not shown.
1 change: 0 additions & 1 deletion src/com/amazon/pay/impl/PayClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -1196,7 +1196,6 @@ public GetMerchantAccountStatusResponseData getMerchantAccountStatus()
}

private ResponseData sendRequest(String httpPostRequest) {
System.out.println("Request" + httpPostRequest);
ResponseData response = null;

try {
Expand Down
8 changes: 2 additions & 6 deletions src/com/amazon/pay/request/RequestHelper.java
Original file line number Diff line number Diff line change
Expand Up @@ -89,16 +89,12 @@ private String constructSignature(Map<String, String> params) {
final String stringToSign = postHeader + Util.convertParameterMapToString(sortedParams);
signature = Util.urlEncode(Util.getSignature(stringToSign, payConfig.getSecretKey()));
} catch (UnsupportedEncodingException ex) {
ex.printStackTrace();
throw new AmazonClientException("Encountered UnsupportedEncodingException:", ex);
} catch (IllegalStateException ex) {
ex.printStackTrace();
throw new AmazonClientException("Encountered IllegalStateException:", ex);
} catch (NoSuchAlgorithmException ex) {
ex.printStackTrace();
throw new AmazonClientException("Encountered NoSuchAlgorithmException:", ex);
} catch (InvalidKeyException ex) {
ex.printStackTrace();
throw new AmazonClientException("Encountered InvalidKeyException:", ex);
}
return signature;
Expand Down Expand Up @@ -423,9 +419,9 @@ public String getPostURL(SetBillingAgreementDetailsRequest request) {
parameters.put(ServiceConstants.BILLING_AGREEMENT_SELLER_CUSTOM_INFORMATION, request.getCustomInformation());
if (request.getBillingAgreementType() != null)
parameters.put(ServiceConstants.BILLING_AGREEMENT_TYPE, request.getBillingAgreementType().toString());
if (request.getSubscriptionAmount() != null)
if (request.getSubscriptionAmount().getCurrencyCode() != null)
parameters.put(ServiceConstants.BILLING_AGREEMENT_SUBSCRIPTION_AMOUNT_CURRENCY_CODE, request.getSubscriptionAmount().getCurrencyCode());
if (request.getSubscriptionAmount() != null)
if (request.getSubscriptionAmount().getAmount() != null)
parameters.put(ServiceConstants.BILLING_AGREEMENT_SUBSCRIPTION_AMOUNT_AMOUNT, request.getSubscriptionAmount().getAmount());
addClientParameters(parameters, request);

Expand Down

0 comments on commit a68fafc

Please sign in to comment.