Skip to content

Commit 5ec5803

Browse files
Merge pull request #142 from CyberSource/feb-2024-release
Feb 2024 Release
2 parents 4a73143 + 8bb10ce commit 5ec5803

14 files changed

+557
-349
lines changed

README.md

Lines changed: 73 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,13 @@
1-
# Java Client SDK for the CyberSource REST API
21

3-
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.
2+
# Java Client SDK for the CyberSource REST API
43

5-
## Requirements
4+
## Description
65

7-
This SDK has been built using Java 1.8.
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.
87

9-
It has been tested using LTS versions Java 11, Java 17 and Java 19.
8+
## System Requirements
109

11-
**The SDK is guaranteed to work on all Java versions up to and including Java 19.**
10+
This SDK is built using Java 1.8, and has been tested on Java LTS versions 8, 11, 17, 19, and 21, and is compatible with all Java versions starting from Java 8.
1211

1312
## Installation
1413

@@ -26,21 +25,27 @@ It has been tested using LTS versions Java 11, Java 17 and Java 19.
2625

2726
````gradle
2827
dependencies {
29-
compile 'com.cybersource:cybersource-rest-client-java:[INSERT VERSION NUMBER HERE]'
28+
compile 'com.cybersource:cybersource-rest-client-java:[INSERT VERSION NUMBER HERE]'
3029
}
3130
````
3231

3332
***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.***
3433

3534
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).
3635

37-
## Registration & Configuration
36+
## Account Registration and Configuration
3837

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).
38+
* Account Registration
4039

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.
40+
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.
4241

43-
## SDK Usage Examples and Sample Code
42+
* Configuration
43+
44+
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.
45+
46+
***Please note that this is for reference only. Ensure to store the credentials in a more secure manner.***
47+
48+
## How to Use
4449

4550
To get started using this SDK, it is highly recommended to download our sample code repository:
4651

@@ -54,7 +59,52 @@ Additionally, you can find details and examples of how our API is structured in
5459

5560
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.
5661

57-
## MetaKey Support
62+
63+
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)
64+
.
65+
66+
### Example using Sample Code Application
67+
68+
* 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.
69+
* 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).
70+
* 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.
71+
* 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)
72+
73+
For more detailed examples, refer to the [cybersource-rest-samples-java](https://github.com/CyberSource/cybersource-rest-samples-java) repository.
74+
75+
### Switching between Test environment and Production environment
76+
77+
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>.
78+
79+
```java
80+
// For TESTING use
81+
props.setProperty("runEnvironment", "apitest.cybersource.com");
82+
// For PRODUCTION use
83+
//props.setProperty("runEnvironment", "api.cybersource.com");
84+
```
85+
86+
To Use OAuth, use OAuth enabled URLs
87+
88+
```java
89+
// For TESTING use
90+
props.setProperty("runEnvironment", "api-matest.cybersource.com");
91+
// For PRODUCTION use
92+
//props.setProperty("runEnvironment", "api-ma.cybersource.com");
93+
```
94+
95+
API credentials are different for each environment, so be sure to switch to the appropriate credentials when switching environments.
96+
97+
## Logging
98+
99+
[![Generic badge](https://img.shields.io/badge/LOGGING-NEW-GREEN.svg)](https://shields.io/)
100+
101+
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.
102+
103+
More information about this new logging framework can be found in this file : [Logging.md](Logging.md)
104+
105+
## Features
106+
107+
### MetaKey Support
58108

59109
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.
60110

@@ -64,7 +114,7 @@ MIDs continue to be able to create keys for themselves, even if a Meta Key is ge
64114

65115
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).
66116

67-
## OAuth Support
117+
### OAuth Support
68118

69119
OAuth enables service providers to securely share access to customer data without sharing password data.
70120

@@ -85,39 +135,23 @@ In order to use OAuth, set the run environment to OAuth enabled URLs. OAuth only
85135
//props.setProperty("runEnvironment", "api-ma.cybersource.com");
86136
```
87137

88-
### Switching between the sandbox environment and the production environment
89-
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>.
91-
92-
```java
93-
// For TESTING use
94-
props.setProperty("runEnvironment", "apitest.cybersource.com");
95-
// For PRODUCTION use
96-
//props.setProperty("runEnvironment", "api.cybersource.com");
97-
```
138+
## How to Contribute
98139

99-
To Use OAuth, use OAuth enabled URLs
140+
* Fork the repo and create your branch from `master`.
141+
* If you've added code that should be tested, add tests.
142+
* Ensure the test suite passes.
143+
* 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).
100144

101-
```java
102-
// For TESTING use
103-
props.setProperty("runEnvironment", "api-matest.cybersource.com");
104-
// For PRODUCTION use
105-
//props.setProperty("runEnvironment", "api-ma.cybersource.com");
106-
```
107145

108-
API credentials are different for each environment, so be sure to switch to the appropriate credentials when switching environments.
146+
## Need Help?
109147

110-
## Logging
111-
[![Generic badge](https://img.shields.io/badge/LOGGING-NEW-GREEN.svg)](https://shields.io/)
148+
For any help, you can reach out to us at our [Discussion Forum](https://community.developer.cybersource.com/t5/cybersource-APIs/bd-p/api).
112149

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.
150+
## Disclaimer
114151

115-
More information about this new logging framework can be found in this file : [Logging.md](Logging.md)
152+
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.
116153

117154
## License
118155

119-
This repository is distributed under a proprietary license. See the provided [`LICENSE.txt`](/LICENSE.txt) file.
120-
121-
## Disclaimer
156+
This repository is distributed under a proprietary license. See the provided [`LICENSE.txt`](/LICENSE.txt) file
122157

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.
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
2+
# PostPaymentCredentialsRequest
3+
4+
## Properties
5+
Name | Type | Description | Notes
6+
------------ | ------------- | ------------- | -------------
7+
**paymentCredentialType** | **String** | The type of payment credentials to be returned. By default, payment credentials include network token and cryptogram or dynamic CVV. If \&quot;NETWORK_TOKEN\&quot; is supplied then only network token will be returned and cryptogram or dynamic CVV will be excluded. Possible Values: - NETWORK_TOKEN | [optional]
8+
9+
10+

docs/Riskv1authenticationresultsOrderInformation.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
77
**amountDetails** | [**Riskv1authenticationresultsOrderInformationAmountDetails**](Riskv1authenticationresultsOrderInformationAmountDetails.md) | | [optional]
8-
**lineItems** | [**List&lt;Riskv1authenticationresultsOrderInformationLineItems&gt;**](Riskv1authenticationresultsOrderInformationLineItems.md) | | [optional]
98

109

1110

docs/Riskv1authenticationresultsOrderInformationLineItems.md

Lines changed: 0 additions & 12 deletions
This file was deleted.

docs/Tmsv2customersEmbeddedDefaultPaymentInstrumentEmbeddedInstrumentIdentifierTokenizedCard.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44
## Properties
55
Name | Type | Description | Notes
66
------------ | ------------- | ------------- | -------------
7-
**type** | **String** | The network token card association brand Possible Values: - visa - mastercard | [optional]
7+
**type** | **String** | The network token card association brand Possible Values: - visa - mastercard - americanexpress | [optional]
88
**state** | **String** | State of the network token or network token provision Possible Values: - ACTIVE : Network token is active. - SUSPENDED : Network token is suspended. This state can change back to ACTIVE. - DELETED : This is a final state for a network token instance. - UNPROVISIONED : A previous network token provision was unsuccessful. | [optional]
9+
**enrollmentId** | **String** | Unique Identifier for the enrolled PAN. This Id is provided by the card association when a network token is provisioned successfully. | [optional]
10+
**tokenReferenceId** | **String** | Unique Identifier for the network token. This Id is provided by the card association when a network token is provisioned successfully. | [optional]
911
**reason** | **String** | Issuers state for the network token Possible Values: - INVALID_REQUEST : The network token provision request contained invalid data. - CARD_VERIFICATION_FAILED : The network token provision request contained data that could not be verified. - CARD_NOT_ELIGIBLE : Card can currently not be used with issuer for tokenization. - CARD_NOT_ALLOWED : Card can currently not be used with card association for tokenization. - DECLINED : Card can currently not be used with issuer for tokenization. - SERVICE_UNAVAILABLE : The network token service was unavailable or timed out. - SYSTEM_ERROR : An unexpected error occurred with network token service, check configuration. | [optional]
1012
**number** | **String** | The token requestors network token | [optional]
1113
**expirationMonth** | **String** | Two-digit month in which the network token expires. Format: &#x60;MM&#x60;. Possible Values: &#x60;01&#x60; through &#x60;12&#x60;. | [optional]

0 commit comments

Comments
 (0)