Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/diegostamigni/rest.cryptocom.merchant
.NET SDK for Crypto.com REST APIs
https://github.com/diegostamigni/rest.cryptocom.merchant
Last synced: 5 days ago
JSON representation
.NET SDK for Crypto.com REST APIs
- Host: GitHub
- URL: https://github.com/diegostamigni/rest.cryptocom.merchant
- Owner: diegostamigni
- License: mit
- Created: 2021-10-20T12:29:41.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-07-09T21:40:17.000Z (7 months ago)
- Last Synced: 2024-10-15T19:11:46.583Z (4 months ago)
- Language: C#
- Size: 53.7 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Rest.CryptoCom.Merchant
This is an unofficial .NET (standard) library for [Crypto.com](https://pay-docs.crypto.com/#overview) REST APIs.[![.NET](https://github.com/diegostamigni/Rest.CryptoCom.Merchant/actions/workflows/dotnet.yml/badge.svg)](https://github.com/diegostamigni/Rest.CryptoCom.Merchant/actions/workflows/dotnet.yml)
## Description
All APIs are grouped in services:
* Payments service
* Refunds service
* ...All concrete classes respect a contract (ex. `PaymentsService` -> `IPaymentsService`) making things easier for testing/mocking and people that wants to use dependency injection. All services need at least the `ICryptoComConfig` which exposes the following properties:
* CryptoComPublicKey
* CryptoComSecretKeyBecause this config is strictly dependant on your project, you are supposed to inherit from it and provide an implementation upon service construction.
### Examples
#### Create payment
```csharp
var config = MyConfig(); // inherits from `ICryptoComConfig`
var paymentsService = new PaymentsService(config);
var result = await paymentsService.CreateAsync(new(1000, "USD"));
...
```#### Get payment
```csharp
var config = MyConfig(); // inherits from `IGetChangeioConfig`
var paymentsService = new PaymentsService(config);
var result = await paymentsService.GetAsync("payment-id");
...
```### Supported APIs
* Payments
- [x] Create a payment
- [x] List your payments
- [x] Retrieve a payment by ID
- [x] Cancel a payment
* Refunds
- [ ] Request a refund
- [ ] Retrieve a refund by refund ID
- [ ] List your refunds by payment ID
* Rebounds
- [ ] Get rebounds by payment
* Customers
- [ ] Create a customer
- [ ] Get customer by ID
- [ ] Update a customer
- [ ] List all customers
* Products
- [ ] Create a product
- [ ] Get product by ID
- [ ] List all Products
* Subscriptions
- [ ] Create a subscription
- [ ] Get subscription by ID
- [ ] Cancel a subscription
- [ ] List all subscriptionsFeel free to contribute! Support for missing APIs and tests are underway.