An Mpesa Library for .Net
A Daraja Rest API .Net Library written in C#. Well documented and Unit tested.
dotnet add package Mpesa.Net
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.
- OAuth
- AccountBalance
- B2B
- B2C
- C2BSimulate
- C2BRegister
- LipaNaMpesaOnline
- LipaNaMpesaQuery
- ReversalRequest
- TransactionStatus
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
- 0.1.0
- The first proper release
- INTRODUCED:
CommandID()
andIdentityParty()
- Added Testing and Comprehensive Documentations
- 0.0.1
- Work in progress
Geoff Mureithi – @GeoMureithi
Distributed under the Apache-2 license. See LICENSE
for more information.
https://github.com/geofmureithi
- Fork it (https://github.com/geofmureithi/Mpesa.Net/fork)
- Create your feature branch (
git checkout -b feature/fooBar
) - Commit your changes (
git commit -am 'Add some fooBar'
) - Push to the branch (
git push origin feature/fooBar
) - Create a new Pull Request