From 2d45448d22065cff9eeb9bcdc6ab9544a87ca38c Mon Sep 17 00:00:00 2001 From: Harshika Agarwal Date: Wed, 21 Aug 2019 22:14:03 +0000 Subject: [PATCH] Amazon Pay Java SDK 3.6.0 --- CHANGES.txt | 4 + ...zon-pay-3.5.1.jar => amazon-pay-3.6.0.jar} | Bin 236287 -> 237550 bytes pom.xml | 2 +- .../ConfirmBillingAgreementRequest.java | 48 +++++++- .../SetBillingAgreementDetailsRequest.java | 46 ++++++- .../model/BillingAgreementDetails.java | 114 +++++++++++------- .../pay/types/BillingAgreementType.java | 25 ++++ .../amazon/pay/types/ServiceConstants.java | 2 +- .../pay/request/PaymentsAPIRequestTest.java | 96 ++++++++++----- .../pay/response/PaymentsAPIResponseTest.java | 90 +++++++++++++- ...BillingAgreementDetailsWithSCAResponse.xml | 56 +++++++++ ...BillingAgreementDetailsWithSCAResponse.xml | 56 +++++++++ 12 files changed, 457 insertions(+), 82 deletions(-) rename dist/{amazon-pay-3.5.1.jar => amazon-pay-3.6.0.jar} (83%) create mode 100644 src/com/amazon/pay/types/BillingAgreementType.java create mode 100644 tst/com/amazon/pay/response/xml/GetBillingAgreementDetailsWithSCAResponse.xml create mode 100644 tst/com/amazon/pay/response/xml/SetBillingAgreementDetailsWithSCAResponse.xml diff --git a/CHANGES.txt b/CHANGES.txt index 29da71a..fc8424f 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -1,3 +1,7 @@ +Version 3.6.0 - August 2019 +Added additional attributes (successUrl, failureUrl) to ConfirmBillingAgreement and (subscriptionAmount, billingAgreementType) to SetBillingAgreement Details. +See Amazon Pay Strong Customer Authentication (SCA) Upgrade Integration Guide for more information. + Version 3.5.1 - May 2019 - PaymentAuthenticationStatus getter added for GetOrderReferenceDetails, SetOrderReferenceDetails, and SetOrderAttributes API calls - StaticToken getter added for GetOrderReferenceDetails diff --git a/dist/amazon-pay-3.5.1.jar b/dist/amazon-pay-3.6.0.jar similarity index 83% rename from dist/amazon-pay-3.5.1.j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.1 + 3.6.0 commons-codec diff --git a/src/com/amazon/pay/request/ConfirmBillingAgreementRequest.java b/src/com/amazon/pay/request/ConfirmBillingAgreementRequest.java index 65d8d7a..7263af4 100644 --- a/src/com/amazon/pay/request/ConfirmBillingAgreementRequest.java +++ b/src/com/amazon/pay/request/ConfirmBillingAgreementRequest.java @@ -1,5 +1,5 @@ /** - * Copyright 2016-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2016-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -32,6 +32,10 @@ protected ConfirmBillingAgreementRequest getThis() { //required parameters private String amazonBillingAgreementId; + //optional parameters + private String successUrl; + private String failureUrl; + /** * * @param amazonBillingAgreementId @@ -50,6 +54,46 @@ public String getAmazonBillingAgreementId() { return amazonBillingAgreementId; } + /** + * Sets the URL where AmazonPay need to return after buyer successfully authenticate a transaction. + * @param successUrl After Successful authentication AmazonPay redirects + * to the SuccessUrl provided by the merchant + * + * @return Success Url + */ + public ConfirmBillingAgreementRequest setSuccessUrl(String successUrl) { + this.successUrl = successUrl; + return this; + } + + /** + * Sets the URL where AmazonPay need to return after buyer fails to authenticate a transaction. + * @param failureUrl If the buyer failed to provide correct Authentication AmazonPay redirects + * to FailureUrl provided by the merchant. + * + * @return Failure Url + */ + public ConfirmBillingAgreementRequest setFailureUrl(String failureUrl) { + this.failureUrl = failureUrl; + return this; + } + + /** + * + * @return successUrl + */ + public String getSuccessUrl() { + return successUrl; + } + + /** + * + * @return failureUrl + */ + public String getFailureUrl() { + return failureUrl; + } + /** * Returns a string representation of this object; useful for testing and * debugging. @@ -62,6 +106,8 @@ public String getAmazonBillingAgreementId() { public String toString() { return "ConfirmBillingAgreementRequest{" + "amazonBillingAgreementId=" + amazonBillingAgreementId + + ", successUrl=" + successUrl + + ", failureUrl=" + failureUrl + ", mwsAuthToken=" + getMwsAuthToken() + '}'; } diff --git a/src/com/amazon/pay/request/SetBillingAgreementDetailsRequest.java b/src/com/amazon/pay/request/SetBillingAgreementDetailsRequest.java index 39374c9..5e17928 100644 --- a/src/com/amazon/pay/request/SetBillingAgreementDetailsRequest.java +++ b/src/com/amazon/pay/request/SetBillingAgreementDetailsRequest.java @@ -1,5 +1,5 @@ /** - * Copyright 2016-2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2016-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ */ package com.amazon.pay.request; +import com.amazon.pay.response.model.Price; +import com.amazon.pay.types.BillingAgreementType; import java.io.Serializable; /** @@ -37,6 +39,8 @@ protected SetBillingAgreementDetailsRequest getThis() { private String sellerBillingAgreementId; private String storeName; private String customInformation; + private BillingAgreementType billingAgreementType; + private Price subscriptionAmount; /** * @@ -108,6 +112,28 @@ public SetBillingAgreementDetailsRequest setCustomInformation(String customInfor return this; } + /** + * Sets attribute to determine whether the BillingAgreement is merchant initiated or customer initiated. + * @param billingAgreementType can be either "CustomerInitiatedTransaction” or “MerchantInitiatedTransaction" + * + * @return BillingAgreementType + */ + public SetBillingAgreementDetailsRequest setBillingAgreementType(BillingAgreementType billingAgreementType) { + this.billingAgreementType = billingAgreementType; + return this; + } + + /** + * Sets the subscription amount for every charge till the subscription period + * @param subscriptionAmount The subscription amount for every charge till the subscription period. + * + * @return Subscription Amount + */ + public SetBillingAgreementDetailsRequest setSubscriptionAmount(Price subscriptionAmount) { + this.subscriptionAmount = subscriptionAmount; + return this; + } + /** * * @return amazonBillingAgreementId @@ -156,6 +182,22 @@ public String getCustomInformation() { return customInformation; } + /** + * + * @return billingAgreementType + */ + public BillingAgreementType getBillingAgreementType() { + return billingAgreementType; + } + + /** + * + * @return subscriptionAmount + */ + public Price getSubscriptionAmount() { + return subscriptionAmount; + } + /** * Returns a string representation of this object; useful for testing and * debugging. @@ -172,6 +214,8 @@ public String toString() { + ", sellerBillingAgreementId=" + sellerBillingAgreementId + ", storeName=" + storeName + ", customInformation=" + customInformation + + ", billingAgreementType=" + billingAgreementType + + ", subscriptionAmount=" + subscriptionAmount + ", mwsAuthToken=" + getMwsAuthToken() + '}'; } diff --git a/src/com/amazon/pay/response/model/BillingAgreementDetails.java b/src/com/amazon/pay/response/model/BillingAgreementDetails.java index c5cd248..b11406d 100644 --- a/src/com/amazon/pay/response/model/BillingAgreementDetails.java +++ b/src/com/amazon/pay/response/model/BillingAgreementDetails.java @@ -1,5 +1,5 @@ /** - * Copyright 2016-2017 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2016-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -14,6 +14,8 @@ */ package com.amazon.pay.response.model; +import com.amazon.pay.types.BillingAgreementType; + import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlElement; @@ -23,21 +25,23 @@ @XmlAccessorType(XmlAccessType.FIELD) @XmlType(name = "BillingAgreementDetails", propOrder = { - "amazonBillingAgreementId", - "billingAgreementLimits", - "buyer", - "sellerNote", - "platformId", - "destination", - "billingAddress", - "releaseEnvironment", - "sellerBillingAgreementAttributes", - "billingAgreementStatus", - "constraints", - "creationTimestamp", - "expirationTimestamp", - "billingAgreementConsent", - "orderLanguage" + "amazonBillingAgreementId", + "billingAgreementLimits", + "buyer", + "sellerNote", + "platformId", + "destination", + "billingAddress", + "releaseEnvironment", + "sellerBillingAgreementAttributes", + "billingAgreementStatus", + "constraints", + "creationTimestamp", + "expirationTimestamp", + "billingAgreementConsent", + "orderLanguage", + "subscriptionAmount", + "billingAgreementType" }) public class BillingAgreementDetails { @@ -73,7 +77,11 @@ public class BillingAgreementDetails { protected Boolean billingAgreementConsent; @XmlElement(name = "OrderLanguage") protected String orderLanguage; - + @XmlElement(name = "SubscriptionAmount") + protected Price subscriptionAmount; + @XmlElement(name = "BillingAgreementType") + protected BillingAgreementType billingAgreementType; + public BillingAgreementDetails() { super(); @@ -81,7 +89,7 @@ public BillingAgreementDetails() { /** * This value is retrieved from the Amazon Button, AddressBook, or Wallet widgets. - * + * * @return amazonBillingAgreementId */ public String getAmazonBillingAgreementId() { @@ -91,7 +99,7 @@ public String getAmazonBillingAgreementId() { /** * Represents the total amount that you can charge a buyer in a given time period. - * + * * @return billingAgreementLimits */ public BillingAgreementLimits getBillingAgreementLimits() { @@ -99,9 +107,9 @@ public BillingAgreementLimits getBillingAgreementLimits() { } /** - * Provides details about the buyer. This information will + * Provides details about the buyer. This information will * only be returned after you confirm the billing agreement. - * + * * @return buyer */ public Buyer getBuyer() { @@ -109,11 +117,11 @@ public Buyer getBuyer() { } /** - * Represents a description of the billing agreement that is displayed + * Represents a description of the billing agreement that is displayed * in emails to the buyer and on the Amazon Pay website. This response - * element is not returned if you have not set it by calling the + * element is not returned if you have not set it by calling the * SetBillingAgreementDetails operation. - * + * * @return sellerNote */ public String getSellerNote() { @@ -122,7 +130,7 @@ public String getSellerNote() { /** * Represents the SellerId of the Solution Provider that developed the platform. - * + * * @return platformId */ public String getPlatformId() { @@ -130,13 +138,13 @@ public String getPlatformId() { } /** - * - * Represents the address selected by the buyer through the AddressBook widget. - * Complete buyer information will only be returned after you have confirmed the - * billing agreement or have specified a valid AddressConsentToken in the + * + * Represents the address selected by the buyer through the AddressBook widget. + * Complete buyer information will only be returned after you have confirmed the + * billing agreement or have specified a valid AddressConsentToken in the * GetBillingAgreementDetails operation. Until then, only the City, StateOrRegion, * PostalCode, and CountryCode elements are returned. - * + * * @return destination */ public Destination getDestination() { @@ -149,7 +157,7 @@ public BillingAddress getBillingAddress() { /** * Indicates if the order is for a Live (Production) or Sandbox environment. - * + * * @return releaseEnvironment */ public Environment getReleaseEnvironment() { @@ -157,10 +165,10 @@ public Environment getReleaseEnvironment() { } /** - * Provides more context about the billing agreement represented by this Billing Agreement object. - * This response element is not returned if you have not set it by calling the + * Provides more context about the billing agreement represented by this Billing Agreement object. + * This response element is not returned if you have not set it by calling the * SetBillingAgreementDetails operation. - * + * * @return sellerBillingAgreementAttributes */ public SellerBillingAgreementAttributes getSellerBillingAgreementAttributes() { @@ -168,10 +176,10 @@ public SellerBillingAgreementAttributes getSellerBillingAgreementAttributes() { } /** - * Indicates the current status of the billing agreement. - * For more information about the State and ReasonCode response elements, + * Indicates the current status of the billing agreement. + * For more information about the State and ReasonCode response elements, * see Billing Agreement States and Reason Codes. - * + * * @return billingAgreementStatus */ public BillingAgreementStatus getBillingAgreementStatus() { @@ -179,10 +187,10 @@ public BillingAgreementStatus getBillingAgreementStatus() { } /** - * A list of constraints that indicates mandatory information that is missing - * or incorrect. The presence of constraints indicates that the billing agreement + * A list of constraints that indicates mandatory information that is missing + * or incorrect. The presence of constraints indicates that the billing agreement * is not ready to be confirmed and cannot be used for payment operations. - * + * * @return constraints */ public Constraints getConstraints() { @@ -191,7 +199,7 @@ public Constraints getConstraints() { /** * The date and time, in UTC, when the billing agreement was created. In ISO 8601 format. - * + * * @return creationTimestamp */ public XMLGregorianCalendar getCreationTimestamp() { @@ -199,7 +207,7 @@ public XMLGregorianCalendar getCreationTimestamp() { } /** - * + * * @return expirationTimestamp */ public XMLGregorianCalendar getExpirationTimestamp() { @@ -215,13 +223,29 @@ public Boolean isBillingAgreementConsent() { } /** - * + * * @return orderLanguage */ public String getOrderLanguage() { return orderLanguage; } + /** + * + * @return subscriptionAmount + */ + public Price getSubscriptionAmount() { + return subscriptionAmount; + } + + /** + * + * @return billingAgreementType + */ + public BillingAgreementType getBillingAgreementType() { + return billingAgreementType; + } + /** * String representation of Billing Agreement */ @@ -242,7 +266,9 @@ public String toString() { + ", creationTimestamp=" + creationTimestamp + ", expirationTimestamp=" + expirationTimestamp + ", billingAgreementConsent=" + billingAgreementConsent - + ", orderLanguage=" + orderLanguage + '}'; + + ", orderLanguage=" + orderLanguage + + ", subscriptionAmount=" + subscriptionAmount + + ", billingAgreementType=" + billingAgreementType + '}'; } diff --git a/src/com/amazon/pay/types/BillingAgreementType.java b/src/com/amazon/pay/types/BillingAgreementType.java new file mode 100644 index 0000000..3fd87c3 --- /dev/null +++ b/src/com/amazon/pay/types/BillingAgreementType.java @@ -0,0 +1,25 @@ +/** + * Copyright 2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"). + * You may not use this file except in compliance with the License. + * A copy of the License is located at + * + * http://aws.amazon.com/apache2.0 + * + * or in the "license" file accompanying this file. This file is distributed + * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either + * express or implied. See the License for the specific language governing + * permissions and limitations under the License. + */ + +package com.amazon.pay.types; + +/** + * Attribute to determine whether the Billing Agreement is merchant initiated or customer initiated. + */ + +public enum BillingAgreementType { + CustomerInitiatedTransaction, + MerchantInitiatedTransaction +} diff --git a/src/com/amazon/pay/types/ServiceConstants.java b/src/com/amazon/pay/types/ServiceConstants.java index dc963ad..a434ba8 100644 --- a/src/com/amazon/pay/types/ServiceConstants.java +++ b/src/com/amazon/pay/types/ServiceConstants.java @@ -149,7 +149,7 @@ public class ServiceConstants { public static final String GET_MERCHANT_ACCOUNT_STATUS = "GetMerchantAccountStatus"; // SDK version - public static final String APPLICATION_LIBRARY_VERSION = "3.5.1"; + public static final String APPLICATION_LIBRARY_VERSION = "3.6.0"; public static final String GITHUB_SDK_NAME = "amazon-pay-sdk-java"; // Exponential backoff wait times (milliseconds) for retry operations diff --git a/tst/com/amazon/pay/request/PaymentsAPIRequestTest.java b/tst/com/amazon/pay/request/PaymentsAPIRequestTest.java index 5c42fc0..bba6c2c 100644 --- a/tst/com/amazon/pay/request/PaymentsAPIRequestTest.java +++ b/tst/com/amazon/pay/request/PaymentsAPIRequestTest.java @@ -17,6 +17,7 @@ import com.amazon.pay.response.model.Price; import com.amazon.pay.response.model.ProviderCredit; import com.amazon.pay.types.AmazonReferenceIdType; +import com.amazon.pay.types.BillingAgreementType; import com.amazon.pay.types.CurrencyCode; import com.amazon.pay.types.OrderReferenceStatus; import com.amazon.pay.types.SortOrder; @@ -37,7 +38,8 @@ public class PaymentsAPIRequestTest { private final List PCL = Collections.singletonList( - new ProviderCredit("providerId", new Price("1", "USD"))); + new ProviderCredit("providerId", new Price("1", "USD"))); + private final Price subscriptionAmount = new Price("1.25", "EUR"); @Test public void testAuthorizeRequest() { @@ -65,8 +67,8 @@ public void testAuthorizeRequest() { public void testCancelOrderReferenceRequest() { final CancelOrderReferenceRequest request = new CancelOrderReferenceRequest(TestConstants.amazonOrderReferenceId) - .setMWSAuthToken(TestConstants.mwsAuthToken) - .setCancelReason(TestConstants.sampletext); + .setMWSAuthToken(TestConstants.mwsAuthToken) + .setCancelReason(TestConstants.sampletext); Assert.assertEquals(request.getAmazonOrderReferenceId(),TestConstants.amazonOrderReferenceId); Assert.assertEquals(request.getCancelationReason(), TestConstants.sampletext); Assert.assertEquals(request.getMwsAuthToken(), TestConstants.mwsAuthToken); @@ -95,8 +97,8 @@ public void testCapture() { public void testCloseAuthorizationRequest() { final CloseAuthorizationRequest request = new CloseAuthorizationRequest("Auth123") - .setMWSAuthToken(TestConstants.mwsAuthToken) - .setClosureReason(TestConstants.sampletext); + .setMWSAuthToken(TestConstants.mwsAuthToken) + .setClosureReason(TestConstants.sampletext); Assert.assertEquals(request.getAmazonAuthorizationId(), "Auth123"); Assert.assertEquals(request.getClosureReason(), TestConstants.sampletext); @@ -107,8 +109,8 @@ public void testCloseAuthorizationRequest() { public void testCloseOrderReferenceRequest() { final CloseOrderReferenceRequest request = new CloseOrderReferenceRequest(TestConstants.amazonOrderReferenceId) - .setMWSAuthToken(TestConstants.mwsAuthToken) - .setClosureReason(TestConstants.sampletext); + .setMWSAuthToken(TestConstants.mwsAuthToken) + .setClosureReason(TestConstants.sampletext); Assert.assertEquals(request.getAmazonOrderReferenceId(),TestConstants.amazonOrderReferenceId); Assert.assertEquals(request.getClosureReason(), TestConstants.sampletext); @@ -151,11 +153,11 @@ public void testGetCaptureDetailsRequest() { @Test public void testGetOrderReferenceDetailsRequest() { - final GetOrderReferenceDetailsRequest request = + final GetOrderReferenceDetailsRequest request = new GetOrderReferenceDetailsRequest(TestConstants.amazonOrderReferenceId) - .setAddressConsentToken("Atza|IwEBIDcwh13A-nf8EuZahCu") - .setAccessToken("Atza|oVsmstLsCYekhCdyR1Hu6FFveZC") - .setMWSAuthToken(TestConstants.mwsAuthToken); + .setAddressConsentToken("Atza|IwEBIDcwh13A-nf8EuZahCu") + .setAccessToken("Atza|oVsmstLsCYekhCdyR1Hu6FFveZC") + .setMWSAuthToken(TestConstants.mwsAuthToken); Assert.assertEquals(request.getAmazonOrderReferenceId(), TestConstants.amazonOrderReferenceId); Assert.assertEquals(request.getAddressConsentToken(), "Atza|IwEBIDcwh13A-nf8EuZahCu"); @@ -291,6 +293,20 @@ public void testConfirmBillingAgreement() { Assert.assertEquals(request.getMwsAuthToken(), TestConstants.mwsAuthToken); } + @Test + public void testConfirmBillingAgreementWithSCA() { + ConfirmBillingAgreementRequest request = new ConfirmBillingAgreementRequest(TestConstants.billingAgreementId) + .setMWSAuthToken(TestConstants.mwsAuthToken) + .setSuccessUrl(TestConstants.SUCCESS_URL) + .setFailureUrl(TestConstants.FAILURE_URL); + + + Assert.assertEquals(request.getAmazonBillingAgreementId(), TestConstants.billingAgreementId); + Assert.assertEquals(request.getMwsAuthToken(), TestConstants.mwsAuthToken); + Assert.assertEquals(request.getSuccessUrl(), TestConstants.SUCCESS_URL); + Assert.assertEquals(request.getFailureUrl(), TestConstants.FAILURE_URL); + } + @Test public void testGetBillingAgreementDetails() { GetBillingAgreementDetailsRequest request = new GetBillingAgreementDetailsRequest(TestConstants.billingAgreementId) @@ -320,11 +336,35 @@ public void testSetBillingAgreementDetails() { Assert.assertEquals(request.getStoreName(), "store"); } + @Test + public void testSetBillingAgreementDetailsWithSCA() { + final SetBillingAgreementDetailsRequest request = new SetBillingAgreementDetailsRequest(TestConstants.billingAgreementId) + .setMWSAuthToken(TestConstants.mwsAuthToken) + .setCustomInformation("custom") + .setPlatformId("platformId") + .setSellerBillingAgreementId("B12") + .setSellerNote("note12") + .setStoreName("store") + .setBillingAgreementType(BillingAgreementType.CustomerInitiatedTransaction) + .setSubscriptionAmount(subscriptionAmount); + + Assert.assertEquals(request.getAmazonBillingAgreementId(), TestConstants.billingAgreementId); + Assert.assertEquals(request.getMwsAuthToken(), TestConstants.mwsAuthToken); + Assert.assertEquals(request.getCustomInformation(), "custom"); + Assert.assertEquals(request.getPlatformId(), "platformId"); + Assert.assertEquals(request.getSellerBillingAgreementId(), "B12"); + Assert.assertEquals(request.getSellerNote(), "note12"); + Assert.assertEquals(request.getStoreName(), "store"); + Assert.assertEquals(request.getBillingAgreementType(), BillingAgreementType.CustomerInitiatedTransaction); + Assert.assertEquals(request.getSubscriptionAmount().getAmount(), "1.25"); + Assert.assertEquals(request.getSubscriptionAmount().getCurrencyCode(), "EUR"); + } + @Test public void testValidateBillingAgreement() { final ValidateBillingAgreementRequest request = new ValidateBillingAgreementRequest(TestConstants.billingAgreementId) - .setMWSAuthToken(TestConstants.mwsAuthToken); + .setMWSAuthToken(TestConstants.mwsAuthToken); Assert.assertEquals(request.getAmazonBillingAgreementId(), TestConstants.billingAgreementId); Assert.assertEquals(request.getMwsAuthToken(), TestConstants.mwsAuthToken); @@ -334,7 +374,7 @@ public void testValidateBillingAgreement() { public void testGetProviderCreditDetails() { final GetProviderCreditDetailsRequest request = new GetProviderCreditDetailsRequest(TestConstants.providerCreditId, TestConstants.providerSellerId) - .setMWSAuthToken(TestConstants.mwsAuthToken); + .setMWSAuthToken(TestConstants.mwsAuthToken); Assert.assertEquals(request.getAmazonProviderCreditId(), TestConstants.providerCreditId); Assert.assertEquals(request.getSellerId(), TestConstants.providerSellerId); @@ -344,9 +384,9 @@ public void testGetProviderCreditDetails() { @Test public void testGetProviderCreditReversalDetails() { final GetProviderCreditReversalDetailsRequest request = - new GetProviderCreditReversalDetailsRequest( - TestConstants.reversalProviderCreditId, TestConstants.providerSellerId) - .setMWSAuthToken(TestConstants.mwsAuthToken); + new GetProviderCreditReversalDetailsRequest( + TestConstants.reversalProviderCreditId, TestConstants.providerSellerId) + .setMWSAuthToken(TestConstants.mwsAuthToken); Assert.assertEquals(TestConstants.reversalProviderCreditId, request.getAmazonProviderCreditReversalId()); Assert.assertEquals(TestConstants.providerSellerId, request.getSellerId()); @@ -370,7 +410,7 @@ public void testReverseProviderCreditDetails() { Assert.assertEquals(request.getMwsAuthToken(), TestConstants.mwsAuthToken); Assert.assertEquals(request.getCreditReversalAmountCurrencyCode(), CurrencyCode.USD); Assert.assertEquals(request.getCreditReversalNote(), TestConstants.sampletext); - } + } private ChargeRequest testChargeSetup() { return new ChargeRequest() @@ -423,17 +463,17 @@ public void testChargeString() { public void testCreateOrderReferenceForId() { final CreateOrderReferenceForIdRequest request = new CreateOrderReferenceForIdRequest( - TestConstants.billingAgreementId, AmazonReferenceIdType.BILLING_AGREEMENT_ID) - .setInheritShippingAddress(false) - .setConfirmNow(true) - .setOrderTotalCurrencyCode(CurrencyCode.USD) - .setSellerNote("Test Seller Note") - .setSellerOrderId("Test Order ID") - .setStoreName(TestConstants.storeName) - .setSupplementaryData(TestConstants.SUPPLEMENTARY_DATA) - .setCustomInformation("Test Custom Information") - .setOrderTotalAmount("567.89") - .setPlatformId(TestConstants.platformId); + TestConstants.billingAgreementId, AmazonReferenceIdType.BILLING_AGREEMENT_ID) + .setInheritShippingAddress(false) + .setConfirmNow(true) + .setOrderTotalCurrencyCode(CurrencyCode.USD) + .setSellerNote("Test Seller Note") + .setSellerOrderId("Test Order ID") + .setStoreName(TestConstants.storeName) + .setSupplementaryData(TestConstants.SUPPLEMENTARY_DATA) + .setCustomInformation("Test Custom Information") + .setOrderTotalAmount("567.89") + .setPlatformId(TestConstants.platformId); Assert.assertEquals(request.getId(), TestConstants.billingAgreementId); Assert.assertEquals(request.getIdType(), AmazonReferenceIdType.BILLING_AGREEMENT_ID); diff --git a/tst/com/amazon/pay/response/PaymentsAPIResponseTest.java b/tst/com/amazon/pay/response/PaymentsAPIResponseTest.java index 695f17d..7419606 100644 --- a/tst/com/amazon/pay/response/PaymentsAPIResponseTest.java +++ b/tst/com/amazon/pay/response/PaymentsAPIResponseTest.java @@ -1,5 +1,5 @@ /** - * Copyright 2018 Amazon.com, Inc. or its affiliates. All Rights Reserved. + * Copyright 2018-2019 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). * You may not use this file except in compliance with the License. @@ -19,6 +19,7 @@ import com.amazon.pay.impl.PayLogUtil; import com.amazon.pay.response.model.AccountStatus; import com.amazon.pay.response.model.AuthorizationDetails; +import com.amazon.pay.response.model.BillingAgreementDetails; import com.amazon.pay.response.model.CaptureDetails; import com.amazon.pay.response.model.Environment; import com.amazon.pay.response.model.ErrorResponse; @@ -62,6 +63,7 @@ import com.amazon.pay.exceptions.AmazonClientException; import com.amazon.pay.exceptions.AmazonServiceException; import com.amazon.pay.response.parser.ResponseData; +import com.amazon.pay.types.BillingAgreementType; import java.io.FileInputStream; import java.io.IOException; @@ -401,7 +403,7 @@ public void testCaptureDetailsResponseMulticurrency() throws Exception { Assert.assertEquals(res.toXML(), rawResponse); } - @Test + @Test public void testCancelOrderReferenceResponse() throws Exception { final String rawResponse = loadTestFile("CancelOrderReferenceResponse.xml"); final ResponseData response = new ResponseData(HttpURLConnection.HTTP_OK, rawResponse); @@ -410,7 +412,7 @@ public void testCancelOrderReferenceResponse() throws Exception { Assert.assertEquals(res.toXML(), rawResponse); } - @Test + @Test public void testCloseOrderReferenceResponse() throws Exception { final String rawResponse = loadTestFile("CloseOrderReferenceResponse.xml"); final ResponseData response = new ResponseData(HttpURLConnection.HTTP_OK, rawResponse); @@ -419,7 +421,7 @@ public void testCloseOrderReferenceResponse() throws Exception { Assert.assertEquals(res.toXML(), rawResponse); } - @Test + @Test public void testCloseAuthorizationResponse() throws Exception { final String rawResponse = loadTestFile("CloseAuthorizationResponse.xml"); final ResponseData response = new ResponseData(HttpURLConnection.HTTP_OK, rawResponse); @@ -552,11 +554,53 @@ public void testGetBillingAgreementDetailsResponse() throws Exception { Assert.assertEquals(res.getDetails().getBillingAddress(), null); Assert.assertEquals(res.getDetails().getPlatformId(), null); Assert.assertEquals(res.getDetails().getSellerNote(), null); - Assert.assertEquals(res.getRequestId(), "d69e8d60-3682-43d7-bf5e-e2ef64dc685e"); Assert.assertEquals(res.toXML(), rawResponse); } + @Test + public void testGetBillingAgreementDetailsWithSCAResponse() throws Exception { + final String rawResponse = loadTestFile("GetBillingAgreementDetailsWithSCAResponse.xml"); + final ResponseData response = new ResponseData(HttpURLConnection.HTTP_OK, rawResponse); + final GetBillingAgreementDetailsResponseData res = Parser.getBillingAgreementDetailsData(response); + Assert.assertEquals(res.getDetails().getAmazonBillingAgreementId(), "C02-5533845-8537141"); + Assert.assertEquals(res.getDetails().getBillingAgreementStatus().getLastUpdatedTimestamp(), null); + Assert.assertEquals(res.getDetails().getBillingAgreementStatus().getState(), "Draft"); + Assert.assertEquals(res.getDetails().getDestination().getDestinationType(), "Physical"); + Assert.assertEquals(res.getDetails().getDestination().getPhysicalDestination().getCity(), "Chicago"); + Assert.assertEquals(res.getDetails().getDestination().getPhysicalDestination().getCountryCode(), "US"); + Assert.assertEquals(res.getDetails().getDestination().getPhysicalDestination().getPostalCode(), "60602"); + Assert.assertEquals(res.getDetails().getDestination().getPhysicalDestination().getCounty(), null); + Assert.assertEquals(res.getDetails().getDestination().getPhysicalDestination().getDistrict(), null); + Assert.assertEquals(res.getDetails().getConstraints().getConstraint().get(0).getConstraintID(), "BuyerConsentNotSet"); + Assert.assertEquals(res.getDetails().getConstraints().getConstraint().get(0).getDescription(), "The buyer has not given consent for this billing agreement."); + Assert.assertEquals(res.getDetails().getBillingAgreementType(), BillingAgreementType.MerchantInitiatedTransaction); + Assert.assertEquals(res.getDetails().getReleaseEnvironment().SANDBOX, Environment.SANDBOX); + final XMLGregorianCalendar xgc3 = DatatypeFactory.newInstance().newXMLGregorianCalendar("2019-08-20T22:03:09.297Z"); + Assert.assertEquals(res.getDetails().getCreationTimestamp(), xgc3); + Assert.assertEquals(res.getDetails().getBillingAgreementLimits().getAmountLimitPerTimePeriod().getAmount(), "500"); + Assert.assertEquals(res.getDetails().getBillingAgreementLimits().getAmountLimitPerTimePeriod().getCurrencyCode(), "GBP"); + Assert.assertEquals(res.getDetails().getBillingAgreementLimits().getCurrentRemainingBalance().getAmount(), "500.00"); + Assert.assertEquals(res.getDetails().getBillingAgreementLimits().getCurrentRemainingBalance().getCurrencyCode(), "GBP"); + final XMLGregorianCalendar xgc2 = DatatypeFactory.newInstance().newXMLGregorianCalendar("2019-09-01T00:00:00Z"); + Assert.assertEquals(res.getDetails().getBillingAgreementLimits().getTimePeriodEndDate(), xgc2); + final XMLGregorianCalendar xgc4 = DatatypeFactory.newInstance().newXMLGregorianCalendar("2019-08-01T00:00:00Z"); + Assert.assertEquals(res.getDetails().getBillingAgreementLimits().getTimePeriodStartDate(), xgc4); + Assert.assertEquals(res.getDetails().getOrderLanguage(), "en-GB"); + Assert.assertEquals(res.getDetails().isBillingAgreementConsent(), false); + Assert.assertEquals(res.getDetails().getExpirationTimestamp(), null); + Assert.assertEquals(res.getDetails().getSellerBillingAgreementAttributes().getCustomInformation(), "any custom information"); + Assert.assertEquals(res.getDetails().getSellerBillingAgreementAttributes().getSellerBillingAgreementId(), "5678-example-order"); + Assert.assertEquals(res.getDetails().getSellerBillingAgreementAttributes().getStoreName(), "SDK Sample Store Name"); + Assert.assertEquals(res.getDetails().getBillingAddress(), null); + Assert.assertEquals(res.getDetails().getPlatformId(), null); + Assert.assertEquals(res.getDetails().getSellerNote(), "Testing PHP SDK Recurring Samples"); + Assert.assertEquals(res.getDetails().getSubscriptionAmount().getAmount(), "25.00"); + Assert.assertEquals(res.getDetails().getSubscriptionAmount().getCurrencyCode(), "GBP"); + Assert.assertEquals(res.getRequestId(), "954d87bd-b48f-4eb2-b84b-a0200da333cf"); + Assert.assertEquals(res.toXML(), rawResponse); + } + @Test public void testSetBillingAgreementDetailsResponse() throws Exception { final String rawResponse = loadTestFile("SetBillingAgreementDetailsResponse.xml"); @@ -588,6 +632,40 @@ public void testSetBillingAgreementDetailsResponse() throws Exception { Assert.assertEquals(res.toXML(), rawResponse); } + @Test + public void testSetBillingAgreementDetailsWithSCAResponse() throws Exception { + final String rawResponse = loadTestFile("SetBillingAgreementDetailsWithSCAResponse.xml"); + final ResponseData response = new ResponseData(HttpURLConnection.HTTP_OK, rawResponse); + final SetBillingAgreementDetailsResponseData res = Parser.getSetBillingAgreementDetailsResponse(response); + Assert.assertEquals(res.getDetails().getAmazonBillingAgreementId(), "C02-5533845-8537141"); + Assert.assertEquals(res.getDetails().getBillingAgreementStatus().getLastUpdatedTimestamp(), null); + Assert.assertEquals(res.getDetails().getBillingAgreementStatus().getState(), "Draft"); + Assert.assertEquals(res.getDetails().getBillingAgreementStatus().getReasonCode(), null); + Assert.assertEquals(res.getDetails().getBillingAgreementStatus().getReasonDescription(), null); + Assert.assertEquals(res.getDetails().getDestination().getDestinationType(), "Physical"); + Assert.assertEquals(res.getDetails().getDestination().getPhysicalDestination().getCity(), "Chicago"); + Assert.assertEquals(res.getDetails().getDestination().getPhysicalDestination().getCountryCode(), "US"); + Assert.assertEquals(res.getDetails().getDestination().getPhysicalDestination().getPostalCode(), "60602"); + Assert.assertEquals(res.getDetails().getConstraints().getConstraint().get(0).getConstraintID(), "BuyerConsentNotSet"); + Assert.assertEquals(res.getDetails().getConstraints().getConstraint().get(0).getDescription(), "The buyer has not given consent for this billing agreement."); + Assert.assertEquals(res.getDetails().getReleaseEnvironment().SANDBOX, Environment.SANDBOX); + final XMLGregorianCalendar xgc3 = DatatypeFactory.newInstance().newXMLGregorianCalendar("2019-08-20T22:03:09.297Z"); + Assert.assertEquals(res.getDetails().getCreationTimestamp(), xgc3); + Assert.assertEquals(res.getDetails().getBillingAgreementLimits().getAmountLimitPerTimePeriod().getAmount(), "500"); + Assert.assertEquals(res.getDetails().getBillingAgreementLimits().getAmountLimitPerTimePeriod().getCurrencyCode(), "GBP"); + Assert.assertEquals(res.getDetails().getBillingAgreementLimits().getCurrentRemainingBalance().getAmount(), "500.00"); + Assert.assertEquals(res.getDetails().getBillingAgreementLimits().getCurrentRemainingBalance().getCurrencyCode(), "GBP"); + final XMLGregorianCalendar xgc2 = DatatypeFactory.newInstance().newXMLGregorianCalendar("2019-09-01T00:00:00Z"); + Assert.assertEquals(res.getDetails().getBillingAgreementLimits().getTimePeriodEndDate(), xgc2); + final XMLGregorianCalendar xgc4 = DatatypeFactory.newInstance().newXMLGregorianCalendar("2019-08-01T00:00:00Z"); + Assert.assertEquals(res.getDetails().getBillingAgreementLimits().getTimePeriodStartDate(), xgc4); + Assert.assertEquals(res.getDetails().getBillingAgreementType(), BillingAgreementType.MerchantInitiatedTransaction); + Assert.assertEquals(res.getDetails().getSubscriptionAmount().getAmount(), "25.00"); + Assert.assertEquals(res.getDetails().getSubscriptionAmount().getCurrencyCode(), "GBP"); + Assert.assertEquals(res.getRequestId(), "2dee6992-29f6-4d3e-bc86-2cf339241c58"); + Assert.assertEquals(res.toXML(), rawResponse); + } + @Test public void testConfirmBillingAgreementDetailsResponse() throws Exception { final String rawResponse = loadTestFile("ConfirmBillingAgreementResponse.xml"); @@ -718,7 +796,7 @@ public void testGetRefundDetailsResponseMulticurrency() throws Exception { final XMLGregorianCalendar xgc2 = DatatypeFactory.newInstance().newXMLGregorianCalendar("2017-06-28T18:14:34.752Z"); Assert.assertEquals(res.getDetails().getCreationTimestamp(), xgc2); Assert.assertEquals(res.getDetails().getProviderCreditReversalSummaryList(), null); - Assert.assertEquals(res.getDetails().getSoftDescriptor(), "AMZ*Matt's Test Stor"); + Assert.assertEquals(res.getDetails().getSoftDescriptor(), "AMZ*Matt's Test Stor"); // The three new multi-currency specific fields Assert.assertEquals(res.getDetails().getConvertedAmount().getAmount(), "0.03"); diff --git a/tst/com/amazon/pay/response/xml/GetBillingAgreementDetailsWithSCAResponse.xml b/tst/com/amazon/pay/response/xml/GetBillingAgreementDetailsWithSCAResponse.xml new file mode 100644 index 0000000..77c23dd --- /dev/null +++ b/tst/com/amazon/pay/response/xml/GetBillingAgreementDetailsWithSCAResponse.xml @@ -0,0 +1,56 @@ + + + + + C02-5533845-8537141 + + Draft + + en-GB + false + + Physical + + IL + Chicago + US + 60602 + + + + + BuyerConsentNotSet + The buyer has not given consent for this billing agreement. + + + MerchantInitiatedTransaction + + SDK Sample Store Name + any custom information + 5678-example-order + + Sandbox + Testing PHP SDK Recurring Samples + + GBP + 25.00 + + 2019-08-20T22:03:09.297Z + + 2019-08-01T00:00:00Z + + GBP + 500.00 + + + GBP + 500 + + 2019-09-01T00:00:00Z + + + + + 954d87bd-b48f-4eb2-b84b-a0200da333cf + + diff --git a/tst/com/amazon/pay/response/xml/SetBillingAgreementDetailsWithSCAResponse.xml b/tst/com/amazon/pay/response/xml/SetBillingAgreementDetailsWithSCAResponse.xml new file mode 100644 index 0000000..f802c90 --- /dev/null +++ b/tst/com/amazon/pay/response/xml/SetBillingAgreementDetailsWithSCAResponse.xml @@ -0,0 +1,56 @@ + + + + + C02-5533845-8537141 + + Draft + + en-GB + false + + Physical + + IL + Chicago + US + 60602 + + + + + BuyerConsentNotSet + The buyer has not given consent for this billing agreement. + + + MerchantInitiatedTransaction + + SDK Sample Store Name + any custom information + 5678-example-order + + Sandbox + Testing PHP SDK Recurring Samples + + GBP + 25.00 + + 2019-08-20T22:03:09.297Z + + 2019-08-01T00:00:00Z + + GBP + 500.00 + + + GBP + 500 + + 2019-09-01T00:00:00Z + + + + + 2dee6992-29f6-4d3e-bc86-2cf339241c58 + + \ No newline at end of file