GreatIdeas.Paystack.SDK 1.0.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package GreatIdeas.Paystack.SDK --version 1.0.2                
NuGet\Install-Package GreatIdeas.Paystack.SDK -Version 1.0.2                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="GreatIdeas.Paystack.SDK" Version="1.0.2" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add GreatIdeas.Paystack.SDK --version 1.0.2                
#r "nuget: GreatIdeas.Paystack.SDK, 1.0.2"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install GreatIdeas.Paystack.SDK as a Cake Addin
#addin nuget:?package=GreatIdeas.Paystack.SDK&version=1.0.2

// Install GreatIdeas.Paystack.SDK as a Cake Tool
#tool nuget:?package=GreatIdeas.Paystack.SDK&version=1.0.2                

<img src="https://paystack.com/favicon.png" height="40"/> GreatIdeas.Paystack.SDK

License

What is it?

This is a .Net wrapper for Paystack RESTful API. It is a simple library that allows you to easily integrate Paystack's payment gateway into your application for African countries (Nigeria, Ghana, South Africa) and accepting international currencies (USD).

API Endpoints

Getting Started

This section will briefly guide you through the steps to get started with the library.

  1. Install the NuGet package
dotnet add package GreatIdeas.Paystack.SDK
  1. Add the Paystack dependency to your project. It is recommended to use the appsettings or other secret management to store your secret key.
// Using a web application
using GreatIdeas.Paystack.SDK;

var builder = WebApplication.CreateBuilder(args);

const string secretKey = "sk_test_xxx";

builder.Services
    .AddPaystack(secretKey);
    
// Using a console application
using GreatIdeas.Paystack.SDK;
using Microsoft.Extensions.Hosting;

const string secretKey = "sk_test_xxx";

var host = new HostBuilder()
    .ConfigureServices(services =>
    {
        services.AddPaystack(secretKey);
    })
    .Build();
    
  1. Usage of the library Transaction
...

private readonly IPaystackTransaction _paystackTransaction;

public Transaction(IPaystackTransaction paystackTransaction)
{
    _paystackTransaction = paystackTransaction;
}

public async Task<TransactionInitializeResponse> AcceptPayment(TransactionInitializeModel model,
        CancellationToken cancellationToken)
{
    var response = await _paystackTransaction.InitializeAsync(model, cancellationToken);
    return response!;
}
  
Product Compatible and additional computed target framework versions.
.NET net6.0 is compatible.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.3 284 10/11/2023
1.0.3-develop.1 62 10/11/2023
1.0.2 1,311 2/5/2023
1.0.1 467 4/28/2022
1.0.0 436 4/18/2022