Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Add this dependency to your project's POM:
<dependency>
<groupId>com.adyen</groupId>
<artifactId>adyen-java-api-library</artifactId>
<version>1.4.1</version>
<version>1.5.0</version>
</dependency>
```

Expand Down
119 changes: 119 additions & 0 deletions docs/checkout-api.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,119 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<title>Adyen-java-api-library by Adyen</title>

<link rel="stylesheet" href="stylesheets/styles.css">
<link rel="stylesheet" href="stylesheets/github-light.css">
<meta name="viewport" content="width=device-width">
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
<div class="wrapper">
<header>
<h1>Adyen-java-api-library</h1>
<p>Adyen API Library for Java</p>

<p class="view"><a href="https://github.com/Adyen/adyen-java-api-library">View the Project on GitHub
<small>Adyen/adyen-java-api-library</small>
</a></p>


<ul>
<li><a href="https://github.com/Adyen/adyen-java-api-library/zipball/master">Download <strong>ZIP
File</strong></a></li>
<li><a href="https://github.com/Adyen/adyen-java-api-library/tarball/master">Download <strong>TAR
Ball</strong></a></li>
<li><a href="https://github.com/Adyen/adyen-java-api-library">View On <strong>GitHub</strong></a></li>
</ul>
</header>
<section>
<h1>Checkout API integration</h1>
<p>
The Checkout API service has the following methods:
</p>
<h2><a id="paymentMethods_27"></a>paymentMethods</h2>
<p>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 <strong>payments(
)</strong>).</p>
<p>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 <strong>paymentMethods(
)</strong> response and update it once a week.</p>
<pre><code class="language-java">Checkout checkout = <span class="hljs-keyword">new</span> Checkout(client);
PaymentMethodsRequest paymentMethodsRequest = <span class="hljs-keyword">new</span> PaymentMethodsRequest();
paymentMethodsRequest.setMerchantAccount(<span class="hljs-string">"YourMerchantAccount"</span>);
PaymentMethodsResponse response = checkout.paymentMethods(paymentMethodsRequest);
</code></pre>

<h2><a id="payments_0"></a>payments</h2>
<p>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:</p>
<ul>
<li>For some payment methods (e.g. Visa, Mastercard, and SEPA Direct Debits) you’ll get a final state in the
<strong>resultCode</strong> (e.g. <strong>authorised</strong> or <strong>refused</strong>).
</li>
<li>For other payment methods, you’ll receive <strong>redirectShopper</strong> as
<strong>resultCode</strong> together with a <strong>redirectUrl</strong>. In this case, the shopper must
finalize the payment on the page behind the redirectUrl.
</li>
</ul>
<pre><code class="language-java">Checkout checkout = <span class="hljs-keyword">new</span> Checkout(client);
PaymentsRequest paymentsRequest = <span class="hljs-keyword">new</span> PaymentsRequest();
Amount amount = <span class="hljs-keyword">new</span> Amount();
amount.setCurrency(<span class="hljs-string">"USD"</span>);
amount.setValue(<span class="hljs-number">1000L</span>);
paymentsRequest.setReference(<span class="hljs-string">"Your order number"</span>);
paymentsRequest.setAmount(amount);
paymentsRequest.setPaymentMethod(<span class="hljs-keyword">new</span> HashMap&lt;String, String&gt;());
paymentsRequest.putPaymentMethodItem(<span class="hljs-string">"number"</span>, <span class="hljs-string">"4111111111111111"</span>);
paymentsRequest.putPaymentMethodItem(<span class="hljs-string">"type"</span>, <span class="hljs-string">"scheme"</span>);
paymentsRequest.putPaymentMethodItem(<span class="hljs-string">"expiryMonth"</span>, <span
class="hljs-string">"08"</span>);
paymentsRequest.putPaymentMethodItem(<span class="hljs-string">"expiryYear"</span>, <span
class="hljs-string">"2018"</span>);
paymentsRequest.putPaymentMethodItem(<span class="hljs-string">"holderName"</span>, <span class="hljs-string">"John Smith"</span>);
paymentsRequest.putPaymentMethodItem(<span class="hljs-string">"cvc"</span>, <span class="hljs-string">"737"</span>);
paymentsRequest.setReturnUrl(<span class="hljs-string">"https://your-company.com/..."</span>);
paymentsRequest.setMerchantAccount(<span class="hljs-string">"YOUR_MERCHANT_ACCOUNT"</span>);
PaymentsResponse paymentResponse = checkout.payments(paymentsRequest);
</code></pre>

<h2><a id="paymentsDetails_37"></a>payments/details</h2>
<p>Submits details for a payment created using <strong>payments( )</strong>. This step is only needed when no
final state has been reached on the <strong>payments( )</strong> request (for example for 3D Secure, or when
getting redirected back directly from a payment method using an app switch).</p>
<p>The exact details, which need to be sent to this endpoint, are always specified in the response of the
associated <strong>payments( )</strong> request. When sending in the request to <strong>paymentsDetails(
)</strong>, make sure you send the corresponding paymentData as obtained during the <strong>payments(
)</strong> call.</p>
<p>In addition, the endpoint can be used to verify a <strong>payload</strong>, which is returned after coming
back from the Checkout SDK or any of the redirect based methods on the Checkout API.</p>
<pre><code class="language-java">Checkout checkout = <span class="hljs-keyword">new</span> Checkout(client);
PaymentsDetailsRequest paymentsDetailsRequest = <span class="hljs-keyword">new</span> PaymentsDetailsRequest();
paymentsDetailsRequest.setPaymentData(<span class="hljs-string">"Hee57361f99...."</span>);
HashMap&lt;String, String&gt; details = <span class="hljs-keyword">new</span> HashMap&lt;&gt;();
details.put(<span class="hljs-string">"MD"</span>, <span class="hljs-string">"sdfsdfsdf..."</span>);
details.put(<span class="hljs-string">"PaRes"</span>, <span class="hljs-string">"sdfsdfsdf..."</span>);
paymentsDetailsRequest.setDetails(details);
PaymentsResponse paymentsResponse = checkout.paymentsDetails(paymentsDetailsRequest);
</code></pre>


</section>
<footer>
<p>This project is maintained by <a href="https://github.com/Adyen">Adyen</a></p>
<p>
<small>Hosted on GitHub Pages &mdash; Theme by <a href="https://github.com/orderedlist">orderedlist</a>
</small>
</p>
</footer>
</div>
<script src="javascripts/scale.fix.js"></script>

</body>
</html>
72 changes: 72 additions & 0 deletions docs/checkout-sdk.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<title>Adyen-java-api-library by Adyen</title>

<link rel="stylesheet" href="stylesheets/styles.css">
<link rel="stylesheet" href="stylesheets/github-light.css">
<meta name="viewport" content="width=device-width">
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>

<![endif]-->
</head>
<body>
<div class="wrapper">
<header>
<h1>Adyen-java-api-library</h1>
<p>Adyen API Library for Java</p>

<p class="view"><a href="https://github.com/Adyen/adyen-java-api-library">View the Project on GitHub
<small>Adyen/adyen-java-api-library</small>
</a></p>


<ul>
<li><a href="https://github.com/Adyen/adyen-java-api-library/zipball/master">Download <strong>ZIP
File</strong></a></li>
<li><a href="https://github.com/Adyen/adyen-java-api-library/tarball/master">Download <strong>TAR
Ball</strong></a></li>
<li><a href="https://github.com/Adyen/adyen-java-api-library">View On <strong>GitHub</strong></a></li>
</ul>
</header>
<section>
<h1>Checkout SDK integration</h1>
<p>
The Checkout SDK service has the following methods:
</p>
<h2><a id="paymentSession_54"></a>paymentSession</h2>
<p>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.</p>
<pre><code class="language-java">Checkout checkout = <span class="hljs-keyword">new</span> Checkout(client);
PaymentSessionRequest paymentSessionRequest = <span class="hljs-keyword">new</span> PaymentSessionRequest();
paymentSessionRequest.setAmount(createAmountObject(<span class="hljs-string">"EUR"</span>, <span class="hljs-number">17408L</span>));
paymentSessionRequest.setReference(<span class="hljs-string">"Your order number"</span>);
paymentSessionRequest.returnUrl(<span class="hljs-string">"https://www.yourshop.com/checkout/result"</span>);
paymentSessionRequest.merchantAccount(<span class="hljs-string">"YOUR_MERCHANT_ACCOUNT"</span>);
paymentSessionRequest.setCountryCode(<span class="hljs-string">"NL"</span>);
paymentSessionRequest.setSdkVersion(<span class="hljs-string">"1.3.0"</span>);
PaymentSessionResponse paymentSessionResponse = checkout.paymentSession(paymentSessionRequest);
</code></pre>
<h2><a id="paymentsresult_67"></a>payments/result</h2>
<p>Verifies the payment result using the payload returned from the Checkout SDK.</p>
<pre><code class="language-java">Checkout checkout = <span class="hljs-keyword">new</span> Checkout(client);
PaymentResultRequest paymentResultRequest = <span class="hljs-keyword">new</span> PaymentResultRequest();
paymentResultRequest.setPayload(<span class="hljs-string">"This is a test payload"</span>);
PaymentResultResponse paymentResultResponse = checkout.paymentResult(paymentResultRequest);
</code></pre>

</section>
<footer>
<p>This project is maintained by <a href="https://github.com/Adyen">Adyen</a></p>
<p>
<small>Hosted on GitHub Pages &mdash; Theme by <a href="https://github.com/orderedlist">orderedlist</a>
</small>
</p>
</footer>
</div>
<script src="javascripts/scale.fix.js"></script>

</body>
</html>
63 changes: 63 additions & 0 deletions docs/checkout-util.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<title>Adyen-java-api-library by Adyen</title>

<link rel="stylesheet" href="stylesheets/styles.css">
<link rel="stylesheet" href="stylesheets/github-light.css">
<meta name="viewport" content="width=device-width">
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
<div class="wrapper">
<header>
<h1>Adyen-java-api-library</h1>
<p>Adyen API Library for Java</p>

<p class="view"><a href="https://github.com/Adyen/adyen-java-api-library">View the Project on GitHub
<small>Adyen/adyen-java-api-library</small>
</a></p>


<ul>
<li><a href="https://github.com/Adyen/adyen-java-api-library/zipball/master">Download <strong>ZIP
File</strong></a></li>
<li><a href="https://github.com/Adyen/adyen-java-api-library/tarball/master">Download <strong>TAR
Ball</strong></a></li>
<li><a href="https://github.com/Adyen/adyen-java-api-library">View On <strong>GitHub</strong></a></li>
</ul>
</header>
<section>
<h1>Checkout Utility Service</h1>
<p>
The Checkout Utility service has the following method:
</p>
<h2>OriginKeys</h2>
<p>
This operation takes the origin domains and returns a JSON object containing the corresponding origin keys
for the domains.
</p>
<pre><code class="language-java">CheckoutUtility checkoutUtility = <span class="hljs-keyword">new</span> CheckoutUtility(client);
OriginKeysRequest originKeysRequest = <span class="hljs-keyword">new</span> OriginKeysRequest();
originKeysRequest.setOriginDomains(<span class="hljs-keyword">new</span> ArrayList&lt;String&gt;(Arrays.asList(<span
class="hljs-string">"https://www.your-domain1.com"</span>, <span class="hljs-string">"https://www.your-domain2.com"</span>)));
OriginKeysResponse originKeysResponse = checkoutUtility.originKeys(originKeysRequest);
</code></pre>

</section>
<footer>
<p>This project is maintained by <a href="https://github.com/Adyen">Adyen</a></p>
<p>
<small>Hosted on GitHub Pages &mdash; Theme by <a href="https://github.com/orderedlist">orderedlist</a>
</small>
</p>
</footer>
</div>
<script src="javascripts/scale.fix.js"></script>

</body>
</html>
Binary file added docs/images/Adyen_logo_rgb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
67 changes: 67 additions & 0 deletions docs/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="chrome=1">
<title>Adyen-java-api-library by Adyen</title>

<link rel="stylesheet" href="stylesheets/styles.css">
<link rel="stylesheet" href="stylesheets/github-light.css">
<meta name="viewport" content="width=device-width">
<!--[if lt IE 9]>
<script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
</head>
<body>
<div class="wrapper">
<header>
<h1>Adyen-java-api-library</h1>
<p>Adyen API Library for Java</p>

<p class="view"><a href="https://github.com/Adyen/adyen-java-api-library">View the Project on GitHub
<small>Adyen/adyen-java-api-library</small>
</a></p>


<ul>
<li><a href="https://github.com/Adyen/adyen-java-api-library/zipball/master">Download <strong>ZIP
File</strong></a></li>
<li><a href="https://github.com/Adyen/adyen-java-api-library/tarball/master">Download <strong>TAR
Ball</strong></a></li>
<li><a href="https://github.com/Adyen/adyen-java-api-library">View On <strong>GitHub</strong></a></li>
</ul>
</header>
<section>
<h1><a id="adyen-apis-library-for-java" class="anchor" href="#adyen-apis-library-for-java"
aria-hidden="true"><span aria-hidden="true" class="octicon octicon-link"></span></a>Adyen API Library for
Java</h1>
<p>
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:
</p>
<ul>
<li><a title="Install the library" href="install-library.html">Install the library</a></li>
<li><a title="Using the library" href="using-library.html">Using the library</a></li>
</ul>
<h2>DISCLAIMER</h2>
<p>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.</p>
</section>
<footer>
<p>This project is maintained by <a href="https://github.com/Adyen">Adyen</a></p>
<p>
<small>Hosted on GitHub Pages &mdash; Theme by <a href="https://github.com/orderedlist">orderedlist</a>
</small>
</p>
</footer>
</div>
<script src="javascripts/scale.fix.js"></script>

</body>
</html>
Loading