zakah

Creator: coderz1093

Last updated:

0 purchases

TODO
Add to Cart

Description:

zakah

Zakah #

Zakah is a client library for safaricom's Mpesa API.
It's name is derived from Kenyan hip hop artiste, Zakah.
It allows you to integrate with safaricom mpesa API.
It's currently work in progress, API will remain unstable for sometime.

MPesa is a mobile phone-based money transfer, financing and microfinancing service, operated by Safaricom, the largest mobile network operator in Kenya. It has since expanded to other countries.
MPesa allows users to deposit, withdraw, transfer money and pay for goods and services easily with a mobile device. - https://en.wikipedia.org/wiki/M-Pesa

Installation #
add the following to your pubspec.yaml file;
dependencies:
zakah: <1.0.0
copied to clipboard
then run;
pub get
copied to clipboard
or with flutter;
flutter packages get
copied to clipboard
now, in your Dart code, you can use:
import 'package:zakah/zakah.dart';
copied to clipboard
this lib is also available at Pub package repository
Usage #
import 'dart:async';
import 'package:zakah/zakah.dart' as zakah;

Future<void> main() async {
var m = new zakah.Mpesa('ConsumerKey', 'ConsumerSecret');
Map b2cResult = await m.b2c(
"apitest390",
"SecurityCredential",
zakah.CommandID["BusinessPayment"],
300,
"601390",
"254708374149",
"some remaks",
Uri.parse("https://www.google.com"),
Uri.parse("https://www.google.com"),
occasion: "some occasion");

print("final b2cResult::");
print(b2cResult);
}
copied to clipboard
Features #

todo

Development setup #

fork this repo.
you need to have dart version2 installed.
open an issue on this repo. In your issue, outline what it is you want to add and why.
make the changes you want on your fork.
your changes should have backward compatibility in mind unless it is impossible to do so.
add tests
format your code using dartfmt:

dartfmt --overwrite --profile --follow-links .
copied to clipboard

run tests and make sure everything is passing:

pub run test .
copied to clipboard

open a pull request on this repo.
NB: I make no commitment of accepting your pull requests.

License

For personal and professional use. You cannot resell or redistribute these repositories in their original state.

Files:

Customer Reviews

There are no reviews.