@@ -89,16 +89,12 @@ private String constructSignature(Map<String, String> params) {
8989 final String stringToSign = postHeader + Util .convertParameterMapToString (sortedParams );
9090 signature = Util .urlEncode (Util .getSignature (stringToSign , payConfig .getSecretKey ()));
9191 } catch (UnsupportedEncodingException ex ) {
92- ex .printStackTrace ();
9392 throw new AmazonClientException ("Encountered UnsupportedEncodingException:" , ex );
9493 } catch (IllegalStateException ex ) {
95- ex .printStackTrace ();
9694 throw new AmazonClientException ("Encountered IllegalStateException:" , ex );
9795 } catch (NoSuchAlgorithmException ex ) {
98- ex .printStackTrace ();
9996 throw new AmazonClientException ("Encountered NoSuchAlgorithmException:" , ex );
10097 } catch (InvalidKeyException ex ) {
101- ex .printStackTrace ();
10298 throw new AmazonClientException ("Encountered InvalidKeyException:" , ex );
10399 }
104100 return signature ;
@@ -423,9 +419,9 @@ public String getPostURL(SetBillingAgreementDetailsRequest request) {
423419 parameters .put (ServiceConstants .BILLING_AGREEMENT_SELLER_CUSTOM_INFORMATION , request .getCustomInformation ());
424420 if (request .getBillingAgreementType () != null )
425421 parameters .put (ServiceConstants .BILLING_AGREEMENT_TYPE , request .getBillingAgreementType ().toString ());
426- if (request .getSubscriptionAmount () != null )
422+ if (request .getSubscriptionAmount (). getCurrencyCode () != null )
427423 parameters .put (ServiceConstants .BILLING_AGREEMENT_SUBSCRIPTION_AMOUNT_CURRENCY_CODE , request .getSubscriptionAmount ().getCurrencyCode ());
428- if (request .getSubscriptionAmount () != null )
424+ if (request .getSubscriptionAmount (). getAmount () != null )
429425 parameters .put (ServiceConstants .BILLING_AGREEMENT_SUBSCRIPTION_AMOUNT_AMOUNT , request .getSubscriptionAmount ().getAmount ());
430426 addClientParameters (parameters , request );
431427
0 commit comments