diff --git a/README.md b/README.md index 45f3a8497..c95b1830a 100644 --- a/README.md +++ b/README.md @@ -23,7 +23,7 @@ Add this dependency to your project's POM: com.adyen adyen-java-api-library - 1.4.1 + 1.5.0 ``` diff --git a/docs/checkout-api.html b/docs/checkout-api.html new file mode 100755 index 000000000..dfae39ecf --- /dev/null +++ b/docs/checkout-api.html @@ -0,0 +1,119 @@ + + + + + + Adyen-java-api-library by Adyen + + + + + + + +
+
+

Adyen-java-api-library

+

Adyen API Library for Java

+ +

View the Project on GitHub + Adyen/adyen-java-api-library +

+ + + +
+
+

Checkout API integration

+

+ The Checkout API service has the following methods: +

+

paymentMethods

+

Queries the available payment methods for a transaction based on the transaction context (like amount, + country, and currency). Besides giving back a list of the available payment methods, the response also + returns which input details you need to collect from the shopper (to be submitted to payments( + )).

+

Although we highly recommend using this endpoint to ensure you are always offering the most up-to-date list + of payment methods, its usage is optional. You can, for example, also cache the paymentMethods( + ) response and update it once a week.

+
Checkout checkout = new Checkout(client);
+PaymentMethodsRequest paymentMethodsRequest = new PaymentMethodsRequest();
+paymentMethodsRequest.setMerchantAccount("YourMerchantAccount");
+PaymentMethodsResponse response = checkout.paymentMethods(paymentMethodsRequest);
+
+  +

payments

+

Sends payment parameters (like amount, country, and currency) together with the input details collected from + the shopper. The response returns the result of the payment request:

+ +
Checkout checkout = new Checkout(client);
+PaymentsRequest paymentsRequest = new PaymentsRequest();
+Amount amount = new Amount();
+amount.setCurrency("USD");
+amount.setValue(1000L);
+paymentsRequest.setReference("Your order number");
+paymentsRequest.setAmount(amount);
+paymentsRequest.setPaymentMethod(new HashMap<String, String>());
+paymentsRequest.putPaymentMethodItem("number", "4111111111111111");
+paymentsRequest.putPaymentMethodItem("type", "scheme");
+paymentsRequest.putPaymentMethodItem("expiryMonth", "08");
+paymentsRequest.putPaymentMethodItem("expiryYear", "2018");
+paymentsRequest.putPaymentMethodItem("holderName", "John Smith");
+paymentsRequest.putPaymentMethodItem("cvc", "737");
+paymentsRequest.setReturnUrl("https://your-company.com/...");
+paymentsRequest.setMerchantAccount("YOUR_MERCHANT_ACCOUNT");
+PaymentsResponse paymentResponse = checkout.payments(paymentsRequest);
+
+ +

payments/details

+

Submits details for a payment created using payments( ). This step is only needed when no + final state has been reached on the payments( ) request (for example for 3D Secure, or when + getting redirected back directly from a payment method using an app switch).

+

The exact details, which need to be sent to this endpoint, are always specified in the response of the + associated payments( ) request. When sending in the request to paymentsDetails( + ), make sure you send the corresponding paymentData as obtained during the payments( + ) call.

+

In addition, the endpoint can be used to verify a payload, which is returned after coming + back from the Checkout SDK or any of the redirect based methods on the Checkout API.

+
Checkout checkout = new Checkout(client);
+PaymentsDetailsRequest paymentsDetailsRequest = new PaymentsDetailsRequest();
+paymentsDetailsRequest.setPaymentData("Hee57361f99....");
+HashMap<String, String> details = new HashMap<>();
+details.put("MD", "sdfsdfsdf...");
+details.put("PaRes", "sdfsdfsdf...");
+paymentsDetailsRequest.setDetails(details);
+PaymentsResponse paymentsResponse = checkout.paymentsDetails(paymentsDetailsRequest);
+
+ + +
+ +
+ + + + diff --git a/docs/checkout-sdk.html b/docs/checkout-sdk.html new file mode 100755 index 000000000..4e1cbae2d --- /dev/null +++ b/docs/checkout-sdk.html @@ -0,0 +1,72 @@ + + + + + + Adyen-java-api-library by Adyen + + + + + + + +
+
+

Adyen-java-api-library

+

Adyen API Library for Java

+ +

View the Project on GitHub + Adyen/adyen-java-api-library +

+ + + +
+
+

Checkout SDK integration

+

+ The Checkout SDK service has the following methods: +

+

paymentSession

+

Provides the data object that can be used to start the Checkout SDK. To set up the payment, pass its amount, currency, and other required parameters. We use this to optimise the payment flow and perform better risk assessment of the transaction.

+
Checkout checkout = new Checkout(client);
+PaymentSessionRequest paymentSessionRequest = new PaymentSessionRequest();
+paymentSessionRequest.setAmount(createAmountObject("EUR", 17408L));
+paymentSessionRequest.setReference("Your order number");
+paymentSessionRequest.returnUrl("https://www.yourshop.com/checkout/result");
+paymentSessionRequest.merchantAccount("YOUR_MERCHANT_ACCOUNT");
+paymentSessionRequest.setCountryCode("NL");
+paymentSessionRequest.setSdkVersion("1.3.0");
+PaymentSessionResponse paymentSessionResponse = checkout.paymentSession(paymentSessionRequest);
+
+

payments/result

+

Verifies the payment result using the payload returned from the Checkout SDK.

+
Checkout checkout = new Checkout(client);
+PaymentResultRequest paymentResultRequest = new PaymentResultRequest();
+paymentResultRequest.setPayload("This is a test payload");
+PaymentResultResponse paymentResultResponse = checkout.paymentResult(paymentResultRequest);
+
+ +
+ +
+ + + + diff --git a/docs/checkout-util.html b/docs/checkout-util.html new file mode 100755 index 000000000..41a44fbaa --- /dev/null +++ b/docs/checkout-util.html @@ -0,0 +1,63 @@ + + + + + + Adyen-java-api-library by Adyen + + + + + + + +
+
+

Adyen-java-api-library

+

Adyen API Library for Java

+ +

View the Project on GitHub + Adyen/adyen-java-api-library +

+ + + +
+
+

Checkout Utility Service

+

+ The Checkout Utility service has the following method: +

+

OriginKeys

+

+ This operation takes the origin domains and returns a JSON object containing the corresponding origin keys + for the domains. +

+
CheckoutUtility checkoutUtility = new CheckoutUtility(client);
+OriginKeysRequest originKeysRequest = new OriginKeysRequest();
+originKeysRequest.setOriginDomains(new ArrayList<String>(Arrays.asList("https://www.your-domain1.com", "https://www.your-domain2.com")));
+OriginKeysResponse originKeysResponse = checkoutUtility.originKeys(originKeysRequest);
+
+ +
+ +
+ + + + diff --git a/docs/images/Adyen_logo_rgb.png b/docs/images/Adyen_logo_rgb.png new file mode 100755 index 000000000..1c1986e69 Binary files /dev/null and b/docs/images/Adyen_logo_rgb.png differ diff --git a/docs/index.html b/docs/index.html new file mode 100755 index 000000000..21c9b4255 --- /dev/null +++ b/docs/index.html @@ -0,0 +1,67 @@ + + + + + + Adyen-java-api-library by Adyen + + + + + + + +
+
+

Adyen-java-api-library

+

Adyen API Library for Java

+ +

View the Project on GitHub + Adyen/adyen-java-api-library +

+ + + +
+
+

Adyen API Library for + Java

+

+ This manual describes API communication to the Adyen payment system using this API library for Java. + You will get familiar with the following concepts and scenarios: +

+ +

DISCLAIMER

+

The ownership of the content of the Adyen API Library remains with Adyen. The content of the Adyen API + Library may only be used in connection with the services of Adyen and subject to the applicable license + (Apache License, Version 2.0, the “License”), a copy of which is included in the library. Unless required by + applicable law or agreed to in writing, the library is offered and/or distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Adyen does not warrant that the + library or any content will be available uninterrupted or error free, that defects will be corrected, or + that the library or its supporting systems are free of viruses or bugs. Please refer to the License for the + specific language governing permissions and limitations under the License.

+
+ +
+ + + + diff --git a/docs/install-library.html b/docs/install-library.html new file mode 100755 index 000000000..a2ec8810f --- /dev/null +++ b/docs/install-library.html @@ -0,0 +1,69 @@ + + + + + + Adyen-java-api-library by Adyen + + + + + + + +
+
+

Adyen-java-api-library

+

Adyen API Library for Java

+ +

View the Project on GitHub + Adyen/adyen-java-api-library +

+ + + +
+
+

Install the library

+

+

Requirements:

+ +

+

Installation

+ +

You can use Maven or simply download the release.

+

Maven

+

Add this dependency to your project’s POM:

+
<dependency>
+  <groupId>com.adyen</groupId>
+  <artifactId>adyen-java-api-library</artifactId>
+  <version>1.5.0</version>
+</dependency>
+
+ +
+ +
+ + + + diff --git a/docs/javascripts/scale.fix.js b/docs/javascripts/scale.fix.js new file mode 100755 index 000000000..87a40ca71 --- /dev/null +++ b/docs/javascripts/scale.fix.js @@ -0,0 +1,17 @@ +var metas = document.getElementsByTagName('meta'); +var i; +if (navigator.userAgent.match(/iPhone/i)) { + for (i=0; i + + + + + Adyen-java-api-library by Adyen + + + + + + + +
+
+

Adyen-java-api-library

+

Adyen API Library for Java

+ +

View the Project on GitHub + Adyen/adyen-java-api-library +

+ + + +
+
+

Using the library

+

+ Set up a client and set the credentials to the Adyen platform.
+ If you don't know your X-API-KEY, you can obtain it from the Customer Area, as described in How to get the + Checkout API key +

+ +
Config config = new Config();
+config.setApiKey("Your X-API-KEY"));
+config.setApplicationName("Adyen Java API Library");
+Client client = new Client(config);
+client.setEnvironment(Environment.TEST);
+
+
+ +

+ If you are not using Checkout, you can use the authentication with + Webservice Username and Password instead of the X-API-KEY: +

+
config.setUsername("YOUR USERNAME");
+config.setPassword("YOUR PASSWORD");
+
+
+

+ The example connects you to the Adyen test platform. If you want to use our live platform use: +

+
client.setEnvironment(Environment.LIVE);
+
+
+ +

Adyen Checkout Service

+

Adyen Checkout API provides a simple and flexible way to initiate and authorise online payments. + You can use the same integration for payments made with cards (including One-Click and 3D Secure), mobile + wallets, and local payment methods (e.g. iDEAL and Sofort). + To learn more about the API, visit Checkout + documentation. +

+

+ +

Adyen Checkout Utility Service

+

A web service containing utility functions available for merchants integrating with Checkout APIs.

+ + + +
+
+

This project is maintained by Adyen

+

+ Hosted on GitHub Pages — Theme by orderedlist + +

+
+
+ + + + diff --git a/pom.xml b/pom.xml index 6eaccb889..01ca7e636 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ com.adyen adyen-java-api-library jar - 1.4.1 + 1.5.0 Adyen Java API Library Adyen API Client Library for Java https://github.com/adyen/adyen-java-api-library diff --git a/src/main/java/com/adyen/Client.java b/src/main/java/com/adyen/Client.java index 4bfe47f47..bf7f29856 100644 --- a/src/main/java/com/adyen/Client.java +++ b/src/main/java/com/adyen/Client.java @@ -40,7 +40,7 @@ public class Client { public static final String MARKETPAY_FUND_API_VERSION = "v3"; public static final String MARKETPAY_NOTIFICATION_API_VERSION = "v1"; public static final String USER_AGENT_SUFFIX = "adyen-java-api-library/"; - public static final String LIB_VERSION = "1.4.1"; + public static final String LIB_VERSION = "1.5.0"; public static final String CHECKOUT_ENDPOINT_TEST = "https://checkout-test.adyen.com"; public static final String CHECKOUT_ENDPOINT_LIVE = "https://checkout-live.adyen.com"; public static final String CHECKOUT_API_VERSION = "v32";