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
+62-9Lines changed: 62 additions & 9 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
# Python Client SDK for the CyberSource REST API
2
3
4
+
## Description
5
+
3
6
The CyberSource Python client provides convenient access to the [CyberSource REST API](https://developer.cybersource.com/api/reference/api-reference.html) from your Python application.
4
7
5
-
## Requirements
8
+
## System Requirements
6
9
7
10
* Python 3.6 or later
8
11
@@ -14,26 +17,53 @@ The CyberSource Python client provides convenient access to the [CyberSource RES
14
17
pip install cybersource-rest-client-python
15
18
```
16
19
17
-
## Registration & Configuration
20
+
## Account Registration & Configuration
21
+
22
+
* Account Registration
18
23
19
-
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)
24
+
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.
20
25
21
-
Remember this SDK is forusein server-side Python applications that access the CyberSource REST API and credentials should always be securely stored and accessed appropriately.
26
+
* Configuration
22
27
23
-
## SDK Usage Examples and Sample Code
28
+
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.
29
+
30
+
## How to Use
24
31
25
32
To get started using this SDK, it's highly recommended to download our sample code repository:
26
33
27
34
* [Cybersource Python Sample Code Repository (on GitHub)](https://github.com/CyberSource/cybersource-rest-samples-python)
28
35
29
-
In that respository, we have comprehensive sample code for all common uses of our API:
36
+
In that repository, we have comprehensive sample code for all common uses of our API:
30
37
31
38
Additionally, you can find details and examples of how our API is structured in our API Reference Guide:
32
39
33
40
* [Developer Center API Reference](https://developer.cybersource.com/api/reference/api-reference.html)
34
41
35
42
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.
36
43
44
+
### Example using Sample Code Application
45
+
46
+
* Install the CyberSource Python SDK and add the SDK to your requirements.txt file.
47
+
48
+
* Configure your credentials in [Configuration Dictionary](https://github.com/CyberSource/cybersource-rest-samples-python/blob/master/data/Configuration.py#L5C5-L52C98).
49
+
50
+
* Create an instance of [ApiClient](https://github.com/CyberSource/cybersource-rest-samples-python/blob/c73bf7ae4a4826e4a6b652067cf38eb4affe765c/samples/Payments/Payments/simple-authorizationinternet.py#L94C50) and set the required properties in it.
51
+
52
+
* Use the created ApiClient instance to call CyberSource APIs. For example [SimpleAuthorizationInternet](https://github.com/CyberSource/cybersource-rest-samples-python/blob/c73bf7ae4a4826e4a6b652067cf38eb4affe765c/samples/Payments/Payments/simple-authorizationinternet.py#L95C9-L95C76).
53
+
54
+
### Switching between the sandbox environment and the production environment
55
+
56
+
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 `run_environment` property in the SDK Configuration. See our sample at <https://github.com/CyberSource/cybersource-rest-samples-python/blob/master/data/Configuration.py>
57
+
58
+
```python
59
+
# For TESTING use
60
+
self.run_environment = "apitest.cybersource.com"
61
+
# For PRODUCTION use
62
+
# self.run_environment = "api.cybersource.com"
63
+
```
64
+
65
+
API credentials are different for each environment, so be sure to switch to the appropriate credentials when switching environments.
66
+
37
67
## MetaKey Support
38
68
39
69
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.
@@ -65,10 +95,33 @@ Since v0.0.31, a new logging framework has been introduced in the SDK. This new
65
95
66
96
More information about this new logging framework can be found in this file : [Logging.md](Logging.md)
67
97
68
-
## License
98
+
## Features
99
+
100
+
## MetaKey Support
69
101
70
-
This repository is distributed under a proprietary license.
102
+
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.
103
+
104
+
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.
105
+
106
+
MIDs continue to be able to create keys for themselves, even if a Meta Key is generated.
107
+
108
+
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).
109
+
110
+
## How to Contribute
111
+
112
+
* Fork the repo and create your branch from `master`.
113
+
* If you've added code that should be tested, add tests.
114
+
* Ensure the test suite passes.
115
+
* 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).
116
+
117
+
## Need Help?
118
+
119
+
For any help, you can reach out to us at our [Discussion Forum](https://community.developer.cybersource.com/t5/cybersource-APIs/bd-p/api).
71
120
72
121
## Disclaimer
73
122
74
-
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.
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.
124
+
125
+
## License
126
+
127
+
This repository is distributed under a proprietary license. See the provided [`LICENSE.txt`](/LICENSE.txt) file
0 commit comments