MPESADARAJA 1.0.7
dotnet add package MPESADARAJA --version 1.0.7
NuGet\Install-Package MPESADARAJA -Version 1.0.7
<PackageReference Include="MPESADARAJA" Version="1.0.7" />
paket add MPESADARAJA --version 1.0.7
#r "nuget: MPESADARAJA, 1.0.7"
// Install MPESADARAJA as a Cake Addin #addin nuget:?package=MPESADARAJA&version=1.0.7 // Install MPESADARAJA as a Cake Tool #tool nuget:?package=MPESADARAJA&version=1.0.7
MpesaDaraja.Net
NugetPackage for .Net.
Supports .Net Framework 4.6.1 or higher.
Install the Nuget Package by going to Package Console Manager and type
Install-Package MPESADARAJA -Version 1.0.7
For C2B : include namespace using MpesaDaraja;
string []result= Mpesa.C2B(string consumerKey, string consumersecret, bool isSandbox, string paybill, decimal amount, string phone, string reference);
FOR B2B:
string []result= Mpesa.B2B(string consumerKey, string consumersecret, bool isSandbox, string initiatorName, string securityCredentials, decimal amount, string BusinessShortCode, string ReceivingBusinessShortCode, string remarks, string queueTimeUrl, string resultUrl, string accountRef, int SenderIdentifierType, int RecieverIdentifierType);
FOR B2C:
string []result=Mpesa.B2C(string consumerKey, string consumersecret, bool isSandbox, string initiatorName, string securityCredentials, decimal amount, string Business, string customerPhone, string remarks, string queueTimeUrl,string resultUrl, string occassion);
FOR lipaNaMpesaOnline:
string []result=Mpesa.LipaNaMpesaOnlineInitiate(string consumerKey, string consumersecret, string password, bool isSandbox, DateTime TimeOfTransaction, decimal amount, string customerPhone, string BusinessPaybillOrTill, string callbackUrl, string accountRef, [StringLength(20)] string transactionDescription);
To check LipaNaMpesaStatus:
string[] result=Mpesa.LiLipaNaMpesaOnlineStatus(string consumerKey, string consumersecret, string password, bool isSandbox, DateTime TimeOfTransaction, string BusinessShortcode, string checkoutRequestID);
For Transaction Status:
string [] result=Mpesa.TransactionStatus(string consumerKey, string consumersecret, bool isSandbox, string initiatorName, string password,string transactionId,string BusinessPaybillOrTil, string remarks, string queueTimeUrl, string resultUrl,string occassion);
For Reversal:
string [] result= Mpesa.Reversal(string consumerKey, string consumersecret, bool isSandbox, string initiatorName, string password,string transactionId,decimal amount,string receiverparty, string remarks,string queueTimeUrl, string resultUrl,string occassion);
For AccountBalance:
string[] result=AccountBalance(string consumerKey, string consumersecret, bool isSandbox, string initiatorName, string password,string Business, string remarks, string queueTimeUrl, string resultUrl);
For Authentication token:
string token=Authenticate(string consumerKey, string consumersecret, bool isSandbox);
Please Note if Its SandBox Indicate IsSandBox equals true. The string Password for B2C,B2B ,AccountBalance,Reversal indicates SecurityCredentials Make sure to get your credentials from https://developer.safaricom.co.ke
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET Framework | net is compatible. |
-
- NewtonSoft.Json (>= 6.0.4)
- RestSharp (>= 105.2.3)
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.7 | 1,782 | 4/16/2018 |
Included all the api endpoint streamlined the response made it easier to use the certificate...Included Production Urls