Skip to content
This repository has been archived by the owner on Jan 15, 2020. It is now read-only.

geofmureithi-zz/Mpesa.Net

Repository files navigation

Archived

Please use: https://github.com/safaricom/Mpesa.Net

Mpesa.Net 💸

An Mpesa Library for .Net

Nuget Version Build Status Downloads Stats

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 Documentation.

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

About

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

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages