Skip to content
master
Switch branches/tags
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 
 
 
 
 
 
 

cloudpayments-cash

C# client for cloudpayments cash api

Build status NuGet GitHub license

Usage

Get CashApi object with default implementation

using Microsoft.Extensions.Logging;

...

CashApi.GetDefault(new CashSettings { ... }, loggerFactory)

Use Test = true param in development enviroment

CashApi.GetDefault(new CashSettings { ..., Test = true }, loggerFactory)

If project use dependency injection, CashApi can register it services in container.

public IServiceProvider ConfigureServices(IServiceCollection services)
{
    services.AddCloudPaymentCash(new CashSettings { ... })
    ...
}

Create cash vaucher

var api = CashApi.GetDefault(new CashSettings { ... }, loggerFactory)
await api.Receipt(new ReceiptContract { ... }, 123, token)

Second argument (123) is optional and it is used to make requests idempotent.

See cloudpayments api docs for more details about ReceiptContract.

CashSettings description

Name Description Default
PublicId Public ID from CloudPaynets site settings
ApiSecret ApiSecret from CloudPaynets site settings
Endpoint Api endpoint https://api.cloudpayments.ru
Inn Organization INN number. Optional. INN can be set in ReceiptContract
Test Test mode false

About

C# client for cloudpayments cash api

Resources

License

Stars

Watchers

Forks

Packages

No packages published