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
Copy file name to clipboardExpand all lines: README.md
+72-34Lines changed: 72 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,11 @@
1
+
1
2
# Java Client SDK for the CyberSource REST API
2
3
4
+
## Description
5
+
3
6
The CyberSource Java client provides convenient access to the [CyberSource REST API](https://developer.cybersource.com/api/reference/api-reference.html) from your Java application.
4
7
5
-
## Requirements
8
+
## System Requirements
6
9
7
10
This SDK has been built using Java 1.8.
8
11
@@ -26,21 +29,27 @@ It has been tested using LTS versions Java 11, Java 17 and Java 19.
26
29
27
30
````gradle
28
31
dependencies {
29
-
compile 'com.cybersource:cybersource-rest-client-java:[INSERT VERSION NUMBER HERE]'
32
+
compile 'com.cybersource:cybersource-rest-client-java:[INSERT VERSION NUMBER HERE]'
30
33
}
31
34
````
32
35
33
36
***Please note that the version number to be used needs to be inserted in the placeholder mentioned above. Also, remove the square brackets as they are not required with the version number.***
34
37
35
38
For released versions of the SDK, please refer to [Releases](https://github.com/CyberSource/cybersource-rest-client-java/releases) or search on [mvnrepository](https://mvnrepository.com/artifact/com.cybersource/cybersource-rest-client-java) or [search.maven](https://search.maven.org/artifact/com.cybersource/cybersource-rest-client-java).
36
39
37
-
## Registration & Configuration
40
+
## Account Registration and Configuration
41
+
42
+
* Account Registration
43
+
44
+
Follow the first step mentioned in [Getting Started with CyberSource REST SDKs](https://developer.cybersource.com/hello-world/rest-api-sdks.html#gettingstarted) to create a sandbox account.
45
+
46
+
* Configuration
38
47
39
-
Use of this SDK and the CyberSource APIs requires having an account on our system. You can find details of getting a test account and creating your keys [here](https://developer.cybersource.com/api/developer-guides/dita-gettingstarted/registration.html).
48
+
Follow the second step mentioned in [Getting Started with CyberSource REST SDKs](https://developer.cybersource.com/hello-world/rest-api-sdks.html#gettingstarted) to configure the SDK by inputting your credentials.
40
49
41
-
Remember this SDK is for use in server-side Java applications that access the CyberSource REST API and credentials should always be securely stored and accessed appropriately.
50
+
***Please note that this is for reference only. Ensure to store the credentials in a more secure manner.***
42
51
43
-
## SDK Usage Examples and Sample Code
52
+
## How to Use
44
53
45
54
To get started using this SDK, it is highly recommended to download our sample code repository:
46
55
@@ -54,7 +63,52 @@ Additionally, you can find details and examples of how our API is structured in
54
63
55
64
The API Reference Guide provides examples of what information is needed for a particular request and how that information would be formatted. Using those examples, you can easily determine what methods would be necessary to include that information in a request using this SDK.
56
65
57
-
## MetaKey Support
66
+
67
+
To learn more about how to use CyberSource's REST API SDKs, please use [Developer Center REST API SDKs](https://developer.cybersource.com/hello-world/rest-api-sdks.html)
68
+
.
69
+
70
+
### Example using Sample Code Application
71
+
72
+
* Add the [CyberSource REST client as a dependency](https://github.com/CyberSource/cybersource-rest-samples-java/blob/a34f25a384e1fa982f5bb336225e3e37ca3e245d/pom.xml#L20C3-L24C16) in your java project.
73
+
* Configure your credentials in a [Properties Object](https://github.com/CyberSource/cybersource-rest-samples-java/blob/a34f25a384e1fa982f5bb336225e3e37ca3e245d/src/main/java/Data/Configuration.java#L6C2-L55C3).
74
+
* Create an instance of [ApiClient](https://github.com/CyberSource/cybersource-rest-samples-java/blob/a34f25a384e1fa982f5bb336225e3e37ca3e245d/src/main/java/samples/Payments/Payments/SimpleAuthorizationInternet.java#L83C4-L85C46) and set the required properties in it.
75
+
* Use the created ApiClient instance to call CyberSource APIs. For example [SimpleAuthorizationInternet](https://github.com/CyberSource/cybersource-rest-samples-java/blob/a34f25a384e1fa982f5bb336225e3e37ca3e245d/src/main/java/samples/Payments/Payments/SimpleAuthorizationInternet.java#L87C4-L88C51)
76
+
77
+
For more detailed examples, refer to the [cybersource-rest-samples-java](https://github.com/CyberSource/cybersource-rest-samples-java) repository.
78
+
79
+
### Switching between Test environment and Production environment
80
+
81
+
Cybersource maintains a complete sandbox environment for testing and development purposes. This sandbox environment is an exact duplicate of our production environment with the transaction authorization and settlement process simulated. By default, this SDK is configured to communicate with the sandbox environment. To switch to the production environment, set the `runEnvironment` property in the SDK Configuration. See our sample at <https://github.com/CyberSource/cybersource-rest-samples-java/blob/master/src/main/java/Data/Configuration.java>.
Logging framework has been introduced in the SDK which makes use of log4j2 and standardizes the logging so that it can be integrated with the logging in the client application.
106
+
107
+
More information about this new logging framework can be found in this file : [Logging.md](Logging.md)
108
+
109
+
## Features
110
+
111
+
### MetaKey Support
58
112
59
113
A Meta Key is a single key that can be used by one, some, or all merchants (or accounts, if created by a Portfolio user) in the portfolio.
60
114
@@ -64,7 +118,7 @@ MIDs continue to be able to create keys for themselves, even if a Meta Key is ge
64
118
65
119
Further information on MetaKey can be found in [New Business Center User Guide](https://developer.cybersource.com/library/documentation/dev_guides/Business_Center/New_Business_Center_User_Guide.pdf).
66
120
67
-
## OAuth Support
121
+
###OAuth Support
68
122
69
123
OAuth enables service providers to securely share access to customer data without sharing password data.
70
124
@@ -85,39 +139,23 @@ In order to use OAuth, set the run environment to OAuth enabled URLs. OAuth only
### Switching between the sandbox environment and the production environment
142
+
##How to Contribute
89
143
90
-
Cybersource maintains a complete sandbox environment for testing and development purposes. This sandbox environment is an exact duplicate of our production environment with the transaction authorization and settlement process simulated. By default, this SDK is configured to communicate with the sandbox environment. To switch to the production environment, set the `runEnvironment` property in the SDK Configuration. See our sample at <https://github.com/CyberSource/cybersource-rest-samples-java/blob/master/src/main/java/Data/Configuration.java>.
144
+
* Fork the repo and create your branch from `master`.
145
+
* If you've added code that should be tested, add tests.
146
+
* Ensure the test suite passes.
147
+
* Submit your pull request! (Ensure you have [synced your fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/syncing-a-fork) with the original repository before initiating the PR).
For any help, you can reach out to us at our [Discussion Forum](https://community.developer.cybersource.com/t5/cybersource-APIs/bd-p/api).
112
153
113
-
Logging framework has been introduced in the SDK which makes use of log4j2 and standardizes the logging so that it can be integrated with the logging in the client application.
154
+
## Disclaimer
114
155
115
-
More information about this new logging framework can be found in this file : [Logging.md](Logging.md)
156
+
Cybersource may allow Customer to access, use, and/or test a Cybersource product or service that may still be in development or has not been market-tested (“Beta Product”) solely for the purpose of evaluating the functionality or marketability of the Beta Product (a “Beta Evaluation”). Notwithstanding any language to the contrary, the following terms shall apply with respect to Customer’s participation in any Beta Evaluation (and the Beta Product(s)) accessed thereunder): The Parties will enter into a separate form agreement detailing the scope of the Beta Evaluation, requirements, pricing, the length of the beta evaluation period (“Beta Product Form”). Beta Products are not, and may not become, Transaction Services and have not yet been publicly released and are offered for the sole purpose of internal testing and non-commercial evaluation. Customer’s use of the Beta Product shall be solely for the purpose of conducting the Beta Evaluation. Customer accepts all risks arising out of the access and use of the Beta Products. Cybersource may, in its sole discretion, at any time, terminate or discontinue the Beta Evaluation. Customer acknowledges and agrees that any Beta Product may still be in development and that Beta Product is provided “AS IS” and may not perform at the level of a commercially available service, may not operate as expected and may be modified prior to release. CYBERSOURCE SHALL NOT BE RESPONSIBLE OR LIABLE UNDER ANY CONTRACT, TORT (INCLUDING NEGLIGENCE), OR OTHERWISE RELATING TO A BETA PRODUCT OR THE BETA EVALUATION (A) FOR LOSS OR INACCURACY OF DATA OR COST OF PROCUREMENT OF SUBSTITUTE GOODS, SERVICES OR TECHNOLOGY, (B) ANY CLAIM, LOSSES, DAMAGES, OR CAUSE OF ACTION ARISING IN CONNECTION WITH THE BETA PRODUCT; OR (C) FOR ANY INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES INCLUDING, BUT NOT LIMITED TO, LOSS OF REVENUES AND LOSS OF PROFITS.
116
157
117
158
## License
118
159
119
-
This repository is distributed under a proprietary license. See the provided [`LICENSE.txt`](/LICENSE.txt) file.
120
-
121
-
## Disclaimer
160
+
This repository is distributed under a proprietary license. See the provided [`LICENSE.txt`](/LICENSE.txt) file
122
161
123
-
Cybersource may allow Customer to access, use, and/or test a Cybersource product or service that may still be in development or has not been market-tested (“Beta Product”) solely for the purpose of evaluating the functionality or marketability of the Beta Product (a “Beta Evaluation”). Notwithstanding any language to the contrary, the following terms shall apply with respect to Customer’s participation in any Beta Evaluation (and the Beta Product(s)) accessed thereunder): The Parties will enter into a separate form agreement detailing the scope of the Beta Evaluation, requirements, pricing, the length of the beta evaluation period (“Beta Product Form”). Beta Products are not, and may not become, Transaction Services and have not yet been publicly released and are offered for the sole purpose of internal testing and non-commercial evaluation. Customer’s use of the Beta Product shall be solely for the purpose of conducting the Beta Evaluation. Customer accepts all risks arising out of the access and use of the Beta Products. Cybersource may, in its sole discretion, at any time, terminate or discontinue the Beta Evaluation. Customer acknowledges and agrees that any Beta Product may still be in development and that Beta Product is provided “AS IS” and may not perform at the level of a commercially available service, may not operate as expected and may be modified prior to release. CYBERSOURCE SHALL NOT BE RESPONSIBLE OR LIABLE UNDER ANY CONTRACT, TORT (INCLUDING NEGLIGENCE), OR OTHERWISE RELATING TO A BETA PRODUCT OR THE BETA EVALUATION (A) FOR LOSS OR INACCURACY OF DATA OR COST OF PROCUREMENT OF SUBSTITUTE GOODS, SERVICES OR TECHNOLOGY, (B) ANY CLAIM, LOSSES, DAMAGES, OR CAUSE OF ACTION ARISING IN CONNECTION WITH THE BETA PRODUCT; OR (C) FOR ANY INDIRECT, INCIDENTAL OR CONSEQUENTIAL DAMAGES INCLUDING, BUT NOT LIMITED TO, LOSS OF REVENUES AND LOSS OF PROFITS.
0 commit comments