Skip to content

Commit b99e79e

Browse files
authored
Merge pull request #72 from snavinch/master
+ README Changes
2 parents 2e3cfc2 + 9cf4f76 commit b99e79e

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

README.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,18 @@ The API Reference Guide provides examples of what information is needed for a pa
4646
## MetaKey Support
4747
Meta Key is a key generated by an entity that can be used to authenticate on behalf of other entities provided that the entity which holds key is a parent entity or associated as a partner.
4848

49+
## OAuth Support
50+
The CyberSource OAuth2.0 Authorization Server (or API Auth Service) will issue access tokens (based on merchant user credentials) to CyberSource or third-party Applications. These applications can access CyberSource API's on the merchant's behalf, using the access tokens.
51+
During application registration, third-party application developers are issued a client_id and optionally a client_secret (if they can be considered a confidential client, for example a web application). Requesting an access token is fairly straightforward: Use the CyberSource token URL and include a set of form-urlencoded parameters.
52+
For more detailed information on OAuth, refer to the link - https://developer.cybersource.com/api/developer-guides/OAuth/cybs_extend_intro.html
53+
54+
Set the run environment to OAuth enabled URLs. OAuth only works in these run environments.
55+
```
56+
// For TESTING use
57+
props.setProperty("runEnvironment", "CyberSource.Environment.MutualAuth.SANDBOX");
58+
// For PRODUCTION use
59+
//props.setProperty("runEnvironment", "CyberSource.Environment.MutualAuth.PRODUCTION");
60+
```
4961

5062
### Switching between the sandbox environment and the production environment
5163
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.
@@ -57,6 +69,15 @@ props.setProperty("runEnvironment", "CyberSource.Environment.SANDBOX");
5769
//props.setProperty("runEnvironment", "CyberSource.Environment.PRODUCTION");
5870
```
5971

72+
To Use OAuth, use OAuth enabled URLs
73+
74+
```
75+
// For TESTING use
76+
props.setProperty("runEnvironment", "CyberSource.Environment.MutualAuth.SANDBOX");
77+
// For PRODUCTION use
78+
//props.setProperty("runEnvironment", "CyberSource.Environment.MutualAuth.PRODUCTION");
79+
```
80+
6081
API credentials are different for each environment, so be sure to switch to the appropriate credentials when switching environments.
6182

6283

0 commit comments

Comments
 (0)