Mpesa.Net 0.1.1

.NET Core 2.0
Install-Package Mpesa.Net -Version 0.1.1
dotnet add package Mpesa.Net --version 0.1.1
<PackageReference Include="Mpesa.Net" Version="0.1.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Mpesa.Net --version 0.1.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Mpesa.Net, 0.1.1"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Mpesa.Net as a Cake Addin
#addin nuget:?package=Mpesa.Net&version=0.1.1

// Install Mpesa.Net as a Cake Tool
#tool nuget:?package=Mpesa.Net&version=0.1.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.

An Mpesa Library for .Net A Daraja Rest API .Net Library written in C#. Well documented and Unit tested.

Installation

dotnet add package Mpesa.Net

Usage example

ExtraConfig configs = new ExtraConfig
    {
        ShortCode = 600111,
        Initiator = "initiator",
        LNMShortCode = 12345,
        LNMPassWord = "....",
        SecurityCredential = "....",
        CertPath = "~/c-sharp-mpesa-lib/Mpesa/cert.cer"
    };
Api mpesa = new Api(Env.Sandbox, "consumerKey", "consumerSecret", configs);

For more examples and usage, please refer to the Wiki.

APIs

  • OAuth
  • AccountBalance
  • B2B
  • B2C
  • C2BSimulate
  • C2BRegister
  • LipaNaMpesaOnline
  • LipaNaMpesaQuery
  • ReversalRequest
  • TransactionStatus

Development setup

Assuming you have dotnet installed, To setup development environment just clone and get working 😃

git clone https://github.com/geofmureithi/Mpesa.Net
cd Mpesa.Net
dotnet test

Release History

  • 0.1.0
    • The first proper release
    • INTRODUCED: CommandID() and IdentityParty()
    • Added Testing and Comprehensive Documentations
  • 0.0.1
    • Work in progress

Meta

Geoff Mureithi – @GeoMureithi

Distributed under the Apache-2 license. See LICENSE for more information.

https://github.com/geofmureithi

Contributing

  1. Fork it (https://github.com/geofmureithi/Mpesa.Net/fork)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request
Product Versions
.NET net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
.NET Core netcoreapp2.0 netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1
Compatible target framework(s)
Additional computed target framework(s)
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
0.1.1 619 1/1/2019
0.1.0 479 12/31/2018