PaidySDK is the simple and thin Paidy API wrapper library for .NET that supports following features.
- .NET Framework 4.6.1+
- .NET Standard 2.0+
- .NET 5.0+
API wrapper services are provided via Microsoft.Extensions.DependencyInjection
.
.AddPaidy();
- Gets API wrapper service instance via DI.
using Microsoft.Extensions.DependencyInjection;
using Paidy;
public class Startup
{
public void ConfigureServices(IServiceCollection services)
{
var options = new PaidyOptions
(
apiEndpoint: "https://api.paidy.com",
secretKey: "sk_...",
apiVersion: null
);
services.AddPaidy(options);
}
}
using Microsoft.AspNetCore.Mvc;
using Paidy.Payments;
using Paidy.Tokens;
public class SampleController : Controller
{
private PaymentService PaymentService { get; }
private TokenService TokenService { get; }
public SampleController(PaymentService paymentService, TokenService tokenService)
{
this.PaymentService = paymentService;
this.TokenService = tokenService;
}
}
Allows you to parse the JSON payload that is sent from Paidy webhook easily.
var payload = "{ Paidy payment webhook payload }";
var request = PaymentRequest.From(payload);
var payload = "{ Paidy token webhook payload }";
var request = TokenRequest.From(payload);
Getting started from downloading NuGet package.
dotnet add package PaidySDK
PM> Install-Package PaidySDK
This library is provided under MIT License.
Takaaki Suzuki (a.k.a @xin9le) is software developer in Japan who awarded Microsoft MVP for Developer Technologies (C#) since July 2012.