Skip to content

Commit 7b544d9

Browse files
authored
Update README.md
1 parent bd5f6ce commit 7b544d9

File tree

1 file changed

+68
-2
lines changed

1 file changed

+68
-2
lines changed

README.md

Lines changed: 68 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,73 @@
1-
# CyberSource Rest Client Ruby
2-
Ruby client library for the CyberSource REST API
1+
# Ruby Client SDK for the CyberSource REST APIs
2+
3+
The CyberSource Ruby client provides convenient access to the [CyberSource REST API](https://developer.cybersource.com/api/reference/api-reference.html) from your Ruby application.
34

45
[![Version ][rubygems_badge]][rubygems]
56

67
[rubygems_badge]: https://badge.fury.io/rb/cybersource_rest_client.svg
78
[rubygems]: https://rubygems.org/gems/cybersource_rest_client
9+
10+
## Requirements
11+
* Ruby 2.2.2 or higher
12+
* [CyberSource Account](https://developer.cybersource.com/api/developer-guides/dita-gettingstarted/registration.html)
13+
* [CyberSource API Keys](https://prod.developer.cybersource.com/api/developer-guides/dita-gettingstarted/registration/createCertSharedKey.html)
14+
15+
## Dependencies
16+
concurrent-ruby 1.1.3
17+
i18n 1.1.1
18+
minitest 5.11.3
19+
thread_safe 0.3.6
20+
tzinfo 1.2.5
21+
activesupport 5.2.1
22+
interface 1.0.4
23+
json 2.1.0
24+
jwt 2.1.0
25+
ffi 1.9.25
26+
ethon 0.11.0
27+
typhoeus 1.3.1
28+
29+
## Installation
30+
### Bundler
31+
Be sure to always use HTTPS rubygems source in your gemfile and include the cybersource_rest_client.
32+
33+
```
34+
source 'https://rubygems.org' do
35+
gem 'cybersource_rest_client'
36+
end
37+
38+
```
39+
40+
## Registration & Configuration
41+
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)
42+
43+
Once you have your keys, simply load them into the appropriate variables in your code, as per the below sample code dealing with the authentication part of the API request.
44+
45+
Remember this SDK is for use in server-side Ruby applications that access the CyberSource REST API and credentials should always be securely stored and accessed appropriately.
46+
47+
## SDK Usage Examples and Sample Code
48+
To get started using this SDK, it's highly recommended to download our sample code repository:
49+
* [Cybersource Ruby Sample Code Repository (on GitHub)](https://github.com/CyberSource/cybersource-rest-samples-ruby)
50+
51+
In that respository, we have comprehensive sample code for all common uses of our API:
52+
53+
Additionally, you can find details and examples of how our API is structured in our API Reference Guide:
54+
* [Developer Center API Reference](https://developer.cybersource.com/api/reference/api-reference.html)
55+
56+
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.
57+
58+
### Switching between the sandbox environment and the production environment
59+
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-ruby/blob/master/data/Configuration.rb
60+
61+
```Ruby
62+
# For TESTING use
63+
runEnvironment='cybersource.environment.sandbox'
64+
# For PRODUCTION use
65+
# runEnvironment='cybersource.environment.production'
66+
```
67+
68+
API credentials are different for each environment, so be sure to switch to the appropriate credentials when switching environments.
69+
70+
71+
72+
## License
73+
This repository is distributed under a proprietary license. See the provided [`LICENSE.txt`](/LICENSE.txt) file.

0 commit comments

Comments
 (0)