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: cybersource-rest-client-netstandard/README.md
+60-22Lines changed: 60 additions & 22 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,8 +1,9 @@
1
+
1
2
# .NET Standard Client SDK for the CyberSource REST API
2
3
3
4
The CyberSource .NET Standard client provides convenient access to the [CyberSource REST API](https://developer.cybersource.com/api/reference/api-reference.html) from your .NET application.
4
5
5
-
## Requirements
6
+
## System Requirements
6
7
7
8
* .NET Standard 2.1
8
9
@@ -14,13 +15,19 @@ The CyberSource .NET Standard client provides convenient access to the [CyberSou
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.
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
+
* Configuration
20
25
21
-
Remember this SDK is for use in server-side .NET applications that access the CyberSource REST API and credentials should always be securely stored and accessed appropriately.
26
+
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.
22
27
23
-
## SDK Usage Examples and Sample Code
28
+
***Please note that this is for reference only. Ensure to store the credentials in a more secure manner.***
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
@@ -34,7 +41,44 @@ Additionally, you can find details and examples of how our API is structured in
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
37
-
## MetaKey Support
44
+
## Example using Sample Code Application
45
+
46
+
* Add [CyberSource REST client](https://github.com/CyberSource/cybersource-rest-samples-csharp/blob/cfd0c4e996c4d991eef5e06f6c8c520e3354e8c2/cybersource-rest-samples-netcore.csproj#L43) into your .NET Standard project.
47
+
48
+
* Configure your credentials in [Configuration File](https://github.com/CyberSource/cybersource-rest-samples-csharp/blob/cfd0c4e996c4d991eef5e06f6c8c520e3354e8c2/Source/Configuration.cs#L12C9-L48C10)
49
+
50
+
* Use the stored crdentials to create an instance of [clientConfig](https://github.com/CyberSource/cybersource-rest-samples-csharp/blob/cfd0c4e996c4d991eef5e06f6c8c520e3354e8c2/Source/Samples/Payments/Payments/SimpleAuthorizationInternet.cs#L87C17-L88C111).
51
+
52
+
* Create an instance [API](https://github.com/CyberSource/cybersource-rest-samples-csharp/blob/cfd0c4e996c4d991eef5e06f6c8c520e3354e8c2/Source/Samples/Payments/Payments/SimpleAuthorizationInternet.cs#L90) using the clientConfig.
53
+
54
+
* Use the created ApiClient instance to call CyberSource APIs. For example [SimpleAuthorizationInternet](https://github.com/CyberSource/cybersource-rest-samples-csharp/blob/cfd0c4e996c4d991eef5e06f6c8c520e3354e8c2/Source/Samples/Payments/Payments/SimpleAuthorizationInternet.cs#L91).
55
+
56
+
For more detailed examples, refer to the [cybersource-rest-samples-csharp](https://github.com/CyberSource/cybersource-rest-samples-csharp) repository.
57
+
58
+
### Switching between the sandbox environment and the production environment
59
+
60
+
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 [Sample Configuration file](https://github.com/CyberSource/cybersource-rest-samples-csharp/blob/master/Source/Configuration.cs).
Since v0.0.1.7, a new logging framework has been introduced in the SDK. This new logging framework makes use of NLog, and standardizes the logging so that it can be integrated with the logging in the client application.
76
+
77
+
More information about this new logging framework can be found in this file : [Logging.md](Logging.md)
78
+
79
+
## Fetures
80
+
81
+
### MetaKey Support
38
82
39
83
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.
40
84
@@ -44,7 +88,7 @@ MIDs continue to be able to create keys for themselves, even if a Meta Key is ge
44
88
45
89
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).
46
90
47
-
## OAuth Support
91
+
###OAuth Support
48
92
49
93
OAuth enables service providers to securely share access to customer data without sharing password data.
50
94
@@ -65,26 +109,20 @@ In order to use OAuth, set the run environment to OAuth enabled URLs. OAuth only
### Switching between the sandbox environment and the production environment
69
-
70
-
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 [Sample Configuration file](https://github.com/CyberSource/cybersource-rest-samples-csharp/blob/master/Source/Configuration.cs).
API credentials are different for each environment, so be sure to switch to the appropriate credentials when switching environments.
114
+
* Fork the repo and create your branch from `master`.
115
+
* If you've added code that should be tested, add tests.
116
+
* Ensure the test suite passes.
117
+
* 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).
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
122
85
-
Since v0.0.1.7, a new logging framework has been introduced in the SDK. This new logging framework makes use of NLog, and standardizes the logging so that it can be integrated with the logging in the client application.
123
+
## Disclaimer
86
124
87
-
More information about this new logging framework can be found in this file : [Logging.md](Logging.md)
125
+
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.
Copy file name to clipboardExpand all lines: cybersource-rest-client-netstandard/cybersource-rest-client-netstandard.Test/Model/PtsV2PaymentsCapturesPost201ResponseProcessorInformationTests.cs
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -72,6 +72,14 @@ public void TransactionIdTest()
72
72
{
73
73
// TODO unit test for the property 'TransactionId'
74
74
}
75
+
/// <summary>
76
+
/// Test the property 'NetworkTransactionId'
77
+
/// </summary>
78
+
[Test]
79
+
publicvoidNetworkTransactionIdTest()
80
+
{
81
+
// TODO unit test for the property 'NetworkTransactionId'
Copy file name to clipboardExpand all lines: cybersource-rest-client-netstandard/cybersource-rest-client-netstandard.Test/Model/Ptsv2paymentsAcquirerInformationTests.cs
+8Lines changed: 8 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -96,6 +96,14 @@ public void MerchantIdTest()
96
96
{
97
97
// TODO unit test for the property 'MerchantId'
98
98
}
99
+
/// <summary>
100
+
/// Test the property 'AcquirerMerchantId'
101
+
/// </summary>
102
+
[Test]
103
+
publicvoidAcquirerMerchantIdTest()
104
+
{
105
+
// TODO unit test for the property 'AcquirerMerchantId'
Copy file name to clipboardExpand all lines: cybersource-rest-client-netstandard/cybersource-rest-client-netstandard.Test/Model/Riskv1authenticationresultsOrderInformationTests.cs
-8Lines changed: 0 additions & 8 deletions
Original file line number
Diff line number
Diff line change
@@ -72,14 +72,6 @@ public void AmountDetailsTest()
72
72
{
73
73
// TODO unit test for the property 'AmountDetails'
Copy file name to clipboardExpand all lines: cybersource-rest-client-netstandard/cybersource-rest-client-netstandard.Test/Model/Riskv1decisionsAcquirerInformationTests.cs
+27-19Lines changed: 27 additions & 19 deletions
Original file line number
Diff line number
Diff line change
@@ -23,26 +23,26 @@
23
23
namespaceCyberSource.Test
24
24
{
25
25
/// <summary>
26
-
/// Class for testing Riskv1authenticationresultsOrderInformationLineItems
26
+
/// Class for testing Riskv1decisionsAcquirerInformation
27
27
/// </summary>
28
28
/// <remarks>
29
29
/// This file is automatically generated by Swagger Codegen.
30
30
/// Please update the test case below to test the model.
// TODO uncomment below to test "IsInstanceOfType" Riskv1authenticationresultsOrderInformationLineItems
64
-
//Assert.IsInstanceOfType<Riskv1authenticationresultsOrderInformationLineItems> (instance, "variable 'instance' is a Riskv1authenticationresultsOrderInformationLineItems");
63
+
// TODO uncomment below to test "IsInstanceOfType" Riskv1decisionsAcquirerInformation
64
+
//Assert.IsInstanceOfType<Riskv1decisionsAcquirerInformation> (instance, "variable 'instance' is a Riskv1decisionsAcquirerInformation");
Copy file name to clipboardExpand all lines: cybersource-rest-client-netstandard/cybersource-rest-client-netstandard.Test/Model/Tmsv2customersEmbeddedDefaultPaymentInstrumentEmbeddedInstrumentIdentifierTokenizedCardTests.cs
+16Lines changed: 16 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -81,6 +81,22 @@ public void StateTest()
81
81
// TODO unit test for the property 'State'
82
82
}
83
83
/// <summary>
84
+
/// Test the property 'EnrollmentId'
85
+
/// </summary>
86
+
[Test]
87
+
publicvoidEnrollmentIdTest()
88
+
{
89
+
// TODO unit test for the property 'EnrollmentId'
90
+
}
91
+
/// <summary>
92
+
/// Test the property 'TokenReferenceId'
93
+
/// </summary>
94
+
[Test]
95
+
publicvoidTokenReferenceIdTest()
96
+
{
97
+
// TODO unit test for the property 'TokenReferenceId'
0 commit comments