mpesa 0.0.4-dev.1 mpesa: ^0.0.4-dev.1 copied to clipboard
This is a dart wrapper around mpesa daraja api. Written in pure dart which means it's framework agnostic(ios,android,web,plain dart,fuschia) and works out of the box. It provides a nice and well docum [...]
import 'package:mpesa/mpesa.dart';
void main() {
var mpesa = Mpesa(
clientKey: "YOUR_CONSUMER_KEY_HERE",
clientSecret: "YOUR_CONSUMER_SECRET_HERE",
passKey: "YOUR_LNM_PASS_KEY_HERE",
initiatorPassword: "YOUR_SECURITY_CREDENTIAL_HERE",
environment: "sandbox",
);
mpesa
.lipaNaMpesa(
phoneNumber: "",
amount: 1,
businessShortCode: "",
callbackUrl: "",
)
.then((result) {})
.catchError((error) {});
}