Generic.Payment.Integrations 1.0.9

There is a newer version of this package available.
See the version list below for details.
dotnet add package Generic.Payment.Integrations --version 1.0.9                
NuGet\Install-Package Generic.Payment.Integrations -Version 1.0.9                
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="Generic.Payment.Integrations" Version="1.0.9" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Generic.Payment.Integrations --version 1.0.9                
#r "nuget: Generic.Payment.Integrations, 1.0.9"                
#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 Generic.Payment.Integrations as a Cake Addin
#addin nuget:?package=Generic.Payment.Integrations&version=1.0.9

// Install Generic.Payment.Integrations as a Cake Tool
#tool nuget:?package=Generic.Payment.Integrations&version=1.0.9                

.NET Payment and Fintech Integration Library

This library aims to centralize online payment and digital funds transsfer integrations in .NET applications, providing developers with a seamless and standardized way to incorporate payment processing features into their projects. The scope of this project is stricly about unifying integrations that are generic and cut across multiple providers it does not intend to cover all possible apis provided by the individual providers.

Features

  • Unified API: Offers a unified API interface for various payment gateways and fintech services.
  • Easy Integration: Simplifies the integration process, reducing development time and effort.
  • Extensible: Provides a framework for adding new payment gateways and fintech services as needed.
  • Best Practices: Implements industry-standard coding best practices.
  • Multi-Platform Targeting: The library is built using .NET standard 2.0 as such it can be used by both .NET framework and .NET core applications.

Installation

To use this library in your .NET project, follow these steps:

  1. NuGet Package Manager: Open your project in Visual Studio and go to Tools > NuGet Package Manager > Manage NuGet Packages for Solution.

  2. Search for Package: In the NuGet Package Manager, search for the package named Generic.Payment.Integrations.

  3. Install Package: Select the package from the search results and click Install to add it to your project.

Alternatively, you can install the package via the NuGet Package Manager Console using the following command:

Install-Package Generic.Payment.Integrations

Usage

Once the package is installed, you can start using the library to integrate payment and fintech services into your application. Here's an example of how to get started:

The following platforms have been integrated thus far

The following apis have been currently integrated

Provider Remita Paystack
Online Payment No Yes
Fund Transfer Yes Yes
Bulk Fund Transfer Yes Yes
Account Enquiry Yes Yes
Transaction Enquiry Yes Yes
Bulk Transaction Enquiry Yes Yes
Settlement Transaction Yes No
Settlement Transaction Enquiry Yes No
Banks Yes Yes
using Microsoft.AspNetCore.Mvc;
using Integrations.Interfaces;
using Integrations.Model.Common;
using Integrations.Model.Api.Request;

[ApiController]
[Route("[controller]")]
public class PaymentController : ControllerBase
{
    private readonly IPaymentServiceProviderSelector _serviceProviderSelector;
    private readonly ILogger<WeatherForecastController> _logger;

    public WeatherForecastController(IPaymentServiceProviderSelector serviceProviderSelector,
        ILogger<WeatherForecastController> logger)
    {
        _serviceProviderSelector = serviceProviderSelector;
        _logger = logger;
    }

    [HttpGet(Name = "Banks")]
    public async Task<IActionResult> GetBanks()
    {
        var provider = _serviceProviderSelector.GetPaymentService(PaymentProvider.Remita);
        var banks = await provider.GetBanks();

        return Ok(banks);
    }

    [HttpPost(Name = "InitiateBulkTransaction")]
    public async Task<IActionResult> Initiate(BulkTransactionInitiationRequest bulkTransactionInitiationRequest)
    {
        var provider = _serviceProviderSelector.GetPaymentService(PaymentProvider.Remita);
        var transactionResponse = await provider.InitiateTransaction(bulkTransactionInitiationRequest, CleanUp);

        return Ok(transactionResponse);
    }

    
    private Task CleanUp(object requestObject, string rawResponse, string httpMethod, string relativeUrl)
    {
        _logger.LogInformation(relativeUrl, new
        {
            httpMethod,
            rawResponse,
            requestObject
        });

        return Task.CompletedTask;
    }
}

Contributing

Contributions to this library are welcome! If you have ideas for improvements or new features, feel free to fork the repository, make your changes, and submit a pull request.

License

This library is licensed under the MIT License.


Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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.1.0 160 7/3/2024
1.0.9 132 6/23/2024
1.0.7 84 5/8/2024
1.0.6 81 5/8/2024
1.0.5 124 4/1/2024