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
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.
*[CyberSource API Keys](https://prod.developer.cybersource.com/api/developer-guides/dita-gettingstarted/registration/createCertSharedKey.html)
15
-
16
-
## Dependencies
17
-
18
-
* activesupport >= 6.0.3.2, < 8.0
19
-
* interface 1.0.4
20
-
* json 2.1.0
21
-
* jwt 2.1.0
22
-
* typhoeus 1.3.1
23
16
24
17
## Installation
25
18
@@ -33,19 +26,23 @@ Be sure to always use HTTPS rubygems source in your gemfile and include the cybe
33
26
end
34
27
```
35
28
36
-
## Registration & Configuration
29
+
## Account Registration and Configuration
37
30
38
-
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)
31
+
* Account Registration
39
32
40
-
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.
33
+
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.
41
34
42
-
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.
35
+
* Configuration
43
36
44
-
## SDK Usage Examples and Sample Code
37
+
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.
38
+
39
+
***Please note that this is for reference only. Ensure to store the credentials in a more secure manner.***
40
+
41
+
## How to Use
45
42
46
43
To get started using this SDK, it's highly recommended to download our sample code repository:
47
44
48
-
*[CyberSource Ruby Sample Code Repository (on GitHub)](https://github.com/CyberSource/cybersource-rest-samples-ruby)
45
+
*[Cybersource Ruby Sample Code Repository (on GitHub)](https://github.com/CyberSource/cybersource-rest-samples-ruby)
49
46
50
47
In that respository, we have comprehensive sample code for all common uses of our API:
51
48
@@ -55,15 +52,14 @@ Additionally, you can find details and examples of how our API is structured in
55
52
56
53
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
54
58
-
## MetaKey Support
59
-
60
-
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.
61
-
62
-
The Portfolio or Parent Account owns the key and is considered the transaction submitter when a Meta Key is used, while the merchant owns the transaction.
55
+
### SDK Usage Examples and Sample Code
63
56
64
-
MIDs continue to be able to create keys for themselves, even if a Meta Key is generated.
57
+
* Install the CyberSource Ruby SDK and add the SDK to your GemFile.
58
+
* Configure your credentials in [MerchantConfiguration](https://github.com/CyberSource/cybersource-rest-samples-ruby/blob/21be3e94c9144ce217ae20ef476425d384aadc31/data/Configuration.rb#L5C3-L67C6).
59
+
* Create an instance of [ApiClient](https://github.com/CyberSource/cybersource-rest-samples-ruby/blob/21be3e94c9144ce217ae20ef476425d384aadc31/Samples/Payments/Payments/simple-authorizationinternet.rb#L46C9-L46C48).
60
+
* Use the created ApiClient instance and MerchantConfiguration to call CyberSource APIs. For example [SimpleAuthorizationInternet](https://github.com/CyberSource/cybersource-rest-samples-ruby/blob/21be3e94c9144ce217ae20ef476425d384aadc31/Samples/Payments/Payments/simple-authorizationinternet.rb#L46C9-L46C48)
65
61
66
-
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).
62
+
For more detailed examples, refer to the [cybersource-rest-samples-ruby](https://github.com/CyberSource/cybersource-rest-samples-ruby) repository.
67
63
68
64
### Switching between the sandbox environment and the production environment
69
65
@@ -78,10 +74,34 @@ CyberSource maintains a complete sandbox environment for testing and development
78
74
79
75
API credentials are different for each environment, so be sure to switch to the appropriate credentials when switching environments.
80
76
81
-
## License
77
+
## Features
82
78
83
-
This repository is distributed under a proprietary license. See the provided [`LICENSE.txt`](/LICENSE.txt) file.
79
+
### MetaKey Support
80
+
81
+
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.
82
+
83
+
The Portfolio or Parent Account owns the key and is considered the transaction submitter when a Meta Key is used, while the merchant owns the transaction.
84
+
85
+
MIDs continue to be able to create keys for themselves, even if a Meta Key is generated.
86
+
87
+
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).
88
+
89
+
90
+
## How to Contribute
91
+
92
+
* Fork the repo and create your branch from `master`.
93
+
* If you've added code that should be tested, add tests.
94
+
* Ensure the test suite passes.
95
+
* 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).
96
+
97
+
## Need Help?
98
+
99
+
For any help, you can reach out to us at our [Discussion Forum](https://community.developer.cybersource.com/t5/cybersource-APIs/bd-p/api).
84
100
85
101
## Disclaimer
86
102
87
-
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.
103
+
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.
104
+
105
+
## License
106
+
107
+
This repository is distributed under a proprietary license. See the provided [`LICENSE.txt`](/LICENSE.txt) file.
**submit_time_utc** | **String** | Time of request in UTC. Format: `YYYY-MM-DDThh:mm:ssZ`**Example**`2016-08-11T22:47:57Z` equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The `T` separates the date and the time. The `Z` indicates UTC. Returned by Cybersource for all services. | [optional]
7
-
**status** | **String** | The status of the invoice. Possible values: - NOTFOUND | [optional]
7
+
**status** | **String** | The status of the invoice. Possible values: - NOTFOUND | [optional]
8
8
**reason** | **String** | The reason of the status. Possible values: - MISSING_FIELD - INVALID_DATA - DUPLICATE_REQUEST - INVALID_MERCHANT_CONFIGURATION - PROCESSOR_UNAVAILABLE | [optional]
9
9
**message** | **String** | The detail message related to the status and reason listed above. | [optional]
**payment_credential_type** | **String** | The type of payment credentials to be returned. By default, payment credentials include network token and cryptogram or dynamic CVV. If \"NETWORK_TOKEN\" is supplied then only network token will be returned and cryptogram or dynamic CVV will be excluded. Possible Values: - NETWORK_TOKEN | [optional]
**id** | **String** | An unique identification number generated by Cybersource to identify the submitted request. Returned by all services. It is also appended to the endpoint of the resource. On incremental authorizations, this value with be the same as the identification number returned in the original authorization response. | [optional]
8
8
**submit_time_utc** | **String** | Time of request in UTC. Format: `YYYY-MM-DDThh:mm:ssZ`**Example**`2016-08-11T22:47:57Z` equals August 11, 2016, at 22:47:57 (10:47:57 p.m.). The `T` separates the date and the time. The `Z` indicates UTC. Returned by Cybersource for all services. | [optional]
9
-
**status** | **String** | The status of the submitted transaction. Possible values: - PENDING | [optional]
9
+
**status** | **String** | The status of the submitted transaction. Possible values: - PENDING - TRANSMITTED (Only for Online Capture enabled merchants) | [optional]
10
10
**reconciliation_id** | **String** | Reference number for the transaction. Depending on how your Cybersource account is configured, this value could either be provided in the API request or generated by CyberSource. The actual value used in the request to the processor is provided back to you by Cybersource in the response. | [optional]
**transaction_id** | **String** | Processor transaction ID. This value identifies the transaction on a host system. This value is supported only for Moneris. It contains this information: - Terminal used to process the transaction - Shift during which the transaction took place - Batch number - Transaction number within the batch You must store this value. If you give the customer a receipt, display this value on the receipt. Example For the value 66012345001069003: - Terminal ID = 66012345 - Shift number = 001 - Batch number = 069 - Transaction number = 003 | [optional]
**status** | **String** | The status of the submitted transaction. Possible values: - PENDING | [optional]
6
+
**status** | **String** | The status of the submitted transaction. Possible values: - PENDING - TRANSMITTED (Only for Online Capture enabled merchants) | [optional]
7
7
**reason** | **String** | The reason of the status. Possible values: - MISSING_FIELD - INVALID_DATA - DUPLICATE_REQUEST - INVALID_MERCHANT_CONFIGURATION - EXCEEDS_AUTH_AMOUNT - AUTH_ALREADY_REVERSED - TRANSACTION_ALREADY_SETTLED - INVALID_AMOUNT - MISSING_AUTH - TRANSACTION_ALREADY_REVERSED_OR_SETTLED - NOT_SUPPORTED | [optional]
8
8
**message** | **String** | The detail message related to the status and reason listed above. | [optional]
0 commit comments