dart_azampay 0.0.1 copy "dart_azampay: ^0.0.1" to clipboard
dart_azampay: ^0.0.1 copied to clipboard

Dart AzamPay is a Dart package that provides a simple and efficient way to integrate AzamPay payment gateway into your Dart/Flutter applications. With Azampay, you can easily make mobile and bank paym [...]

example/dart_azampay_example.dart

import 'package:dart_azampay/dart_azampay.dart';

void main() async {
  final azamPayClient = AzamPayClient(
    appName: 'My-App',
    clientId: '4a4c16d1-52cc-48eddf23-bfff',
    clientSecret: 'BR2USg29BIubf...vU5ErDtc=',
    sandbox: true, // set to false for production
  );

  // Create an instance of the Checkout service
  final checkoutService = Checkout(azamPayClient);

  // Create a MNOCheckoutRequest
  final mnoRequest = MnoCheckoutRequest(
    accountNumber: '255764XXXXXX',
    additionalProperties: {}, //optional
    amount: '1000',
    currency: 'TZS', // only supported currency at the moment
    externalId: 'external_id',
    provider: MnoProvider.mpesa, // or any other provider
  );

  // Example usage of the checkout service
  final res = await checkoutService.mnoPayment(request: mnoRequest);
  print(res.data); // prints out the response data
}
2
likes
0
points
21
downloads

Publisher

verified publisherkaykhahima.com

Weekly Downloads

Dart AzamPay is a Dart package that provides a simple and efficient way to integrate AzamPay payment gateway into your Dart/Flutter applications. With Azampay, you can easily make mobile and bank payments, post checkouts, disbursements, and pay bills.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

http

More

Packages that depend on dart_azampay