The official Dojo .NET library, supporting .NET Standard 2.0+, .NET Core 2.0+, and .NET Framework 4.6.1+.
Using the .NET Core command-line interface (CLI) tools:
dotnet add package Dojo.Net
Using the NuGet Command Line Interface (CLI):
nuget install Dojo.Net
Using the Package Manager Console:
Install-Package Dojo.Net
From within Visual Studio:
- Open the Solution Explorer.
- Right-click on a project within your solution.
- Click on Manage NuGet Packages...
- Click on the Browse tab and search for "Dojo.Net".
- Click on the Dojo.Net package, select the appropriate version in the right-tab and click Install.
In order to build, NET30+ is required. Do the following:
- Go to
src
subfolder - Run:
dotnet build
For a comprehensive list of APIs and examples, check out the API documentation.
Dojo.Net.PaymentIntentsClient client = new PaymentIntentsClient(
new HttpClient(),
new ApiKeyClientAuthorization(apiKey));
builder.Services.AddSingleton<IClientAuthorization>(new ApiKeyClientAuthorization(apiKey));
builder.Services.AddHttpClient<IPaymentIntentsClient, PaymentIntentsClient>();
The library does not automatically retries requests on intermittent failures like on a connection error. We suggest you use Polly library to setup retry policy.
builder.Services
.AddHttpClient<IPaymentIntentsClient, PaymentIntentsClient>()
.AddTransientHttpErrorPolicy(
x => x.WaitAndRetryAsync(3, retryAttempt => TimeSpan.FromSeconds(Math.Pow(3, retryAttempt))));
For any requests, bug or comments, please open an issue or submit a pull request.