You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Client setup: remove old code and promote best practises (#1525)
* Add javadoc and tests
* Minor edit in README
* Convert field to local var
* Javadoc and tidy up
* Improve test to follow best practises
* Update README to follow best practises
* Update README
* Update README
* Improve code and indentation
* Minor edit
Copy file name to clipboardExpand all lines: README.md
+44-58Lines changed: 44 additions & 58 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -82,8 +82,10 @@ Alternatively, you can download the [release on GitHub](https://github.com/Adyen
82
82
83
83
### General use with API key
84
84
85
-
Every API the library supports is represented by a service object. The name of the service matching the corresponding
86
-
API is listed in the [Supported API versions](#supported-api-versions) section of this document.
85
+
For every API, one or more corresponding service classes can be found in the folder with the same name.
86
+
Check the [Supported API versions](#supported-api-versions).
87
+
88
+
**Note**: For requests on `live` environment, you must define the [Live URL Prefix](https://docs.adyen.com/development-resources/live-endpoints#live-url-prefix) in the Client object:
For requests on live environment, you need to pass the [Live URL Prefix](https://docs.adyen.com/development-resources/live-endpoints#live-url-prefix) to the Client object:
125
-
~~~~java
126
-
// Import the required classes
127
-
importcom.adyen.Client;
128
-
importcom.adyen.enums.Environment;
129
-
importcom.adyen.service.checkout.ModificationsApi
130
-
131
-
// Setup Client and Service
132
-
Client client =newClient("Your X-API-KEY", Environment.LIVE, "Your live URL prefix");
@@ -295,27 +308,9 @@ Client client = new Client(sslContext, apiKey);
295
308
// Use the client
296
309
~~~~
297
310
298
-
### Classic Platforms Error Handling
299
311
300
-
When requests fail, the library throws exceptions. For Classic AFP endpoints like [Create Account Holder](https://docs.adyen.com/api-explorer/Account/6/post/createAccountHolder), you can decode further details from the exception:
In order to submit In-Person requests with [Terminal API over Cloud](https://docs.adyen.com/point-of-sale/design-your-integration/choose-your-architecture/cloud/) you need to initialize the client in a similar way as the steps listed above for Ecommerce transactions, but make sure to include `TerminalCloudAPI`:
312
+
## Using the Cloud Terminal API
313
+
For In-Person Payments integrations with the [Cloud Terminal API](https://docs.adyen.com/point-of-sale/design-your-integration/choose-your-architecture/cloud/), you must initialise the Client **setting the closest**[Region](https://docs.adyen.com/point-of-sale/design-your-integration/terminal-api/#cloud):
For a closer look at how our Java library works, you can clone one of our example integrations:
574
565
*[Java Spring Boot example integration](https://github.com/adyen-examples/adyen-java-spring-online-payments).
575
566
*[Kotlin Spring Boot example integration](https://github.com/adyen-examples/adyen-kotlin-spring-online-payments).
@@ -580,20 +571,15 @@ These include commented code, highlighting key features and concepts, and exampl
580
571
We value your input! Help us enhance our API Libraries and improve the integration experience by providing your feedback. Please take a moment to fill out [our feedback form](https://forms.gle/A4EERrR6CWgKWe5r9) to share your thoughts, suggestions or ideas.
581
572
582
573
## Contributing
583
-
584
-
585
-
We encourage you to contribute to this repository, so everyone can benefit from new features, bug fixes, and any other improvements.
586
-
574
+
We encourage you to contribute to this repository, so everyone can benefit from new features, bug fixes, and any other improvements.
587
575
588
576
Have a look at our [contributing guidelines](CONTRIBUTING.md) to find out how to raise a pull request.
589
-
590
-
577
+
591
578
## Support
592
579
If you have a feature request, or spotted a bug or a technical problem, [create an issue here](https://github.com/Adyen/adyen-java-api-library/issues/new/choose).
593
580
594
-
For other questions, [contact our Support Team](https://www.adyen.help/hc/en-us/requests/new?ticket_form_id=39.1.1705420).
595
-
596
-
581
+
For other questions, [contact our Support Team](https://www.adyen.help/hc/en-us/requests/new?ticket_form_id=39.0.0705420).
582
+
597
583
## Licence
598
584
This repository is available under the [MIT license](https://github.com/Adyen/adyen-java-api-library/blob/main/LICENSE).
0 commit comments