A flutter plugin for integrating Mobile Money Payments to your flutter apps

Overview

MTN AIRTEL

Add Mobile Money payments to your flutter apps using the FlutterWave api gateway.

Features

  • Recieve Payments through Mobile Money in Uganda
  • Supports MTN Momo Transactions
  • Supports Airtel Money Transactions
  • Verify Charges your have made before adding value

Getting started

Get your api keys, head over to https://dashboard.flutterwave.com/settings/apis

You might also want to read about flutterwaves documentation. For this head to https://developer.flutterwave.com/reference

Usage

Create an instance of the UgandaMobileMoney class.

const secretKey = "FLWSECK-XXXXX-X"; // flutterwave secret key
UgandaMobileMoney _mobileMoney = UgandaMobileMoney(secretKey); 

Initiate Payments

void chargeClient() async {
    MomoPayResponse response = await _mobileMoney.chargeClient(
        MomoPayRequest(
            txRef: "MC-01928403", // should be unique for each transaction
            amount: "1500", // amount in UGX you want to charge
            email: "[email protected]", // email of the person you want to charge
            phoneNumber: "256123456723", // clients phone number
            fullname: "Ojangole Joran", // full name of client
            redirectUrl: "https://yoursite.com", // redirect url after payment
            voucher: "128373", // useful for vodafone. you can ignore this
            network: UgandaNetwork.mtn // network, can be either mtn or airtel
            ),
        );

    print(response.message);
  }

To Verify transactions

   void verifyTransaction() {
    _mobileMoney.verifyTransaction(taxRef).then((value) {
      if (value == TransactionStatus.failed) {
        ScaffoldMessenger.of(context)
            .showSnackBar(SnackBar(content: Text("Failed")));
      } else if (value == TransactionStatus.pending) {
        ScaffoldMessenger.of(context)
            .showSnackBar(SnackBar(content: Text("Pending")));
      } else if (value == TransactionStatus.success) {
        ScaffoldMessenger.of(context)
            .showSnackBar(SnackBar(content: Text("Success")));
      } else if (value == TransactionStatus.unknown) {
        ScaffoldMessenger.of(context)
            .showSnackBar(SnackBar(content: Text("Unknown")));
      } else {
        ScaffoldMessenger.of(context)
            .showSnackBar(SnackBar(content: Text("Unknown")));
      }
    });
  }

Additional information

Please contact me if your have any feature requests or file issues via the respository.

You can also buy me a rolex : https://dashboard.flutterwave.com/donate/7nacgysd7ilf

You might also like...

A Flutter starter-kit for production-level apps.

A Flutter starter-kit for production-level apps.

Flutter Starter Introduction We wanted to take Flutter a step further and accelerate the process of building production-level apps. Presenting our sol

Dec 30, 2022

Learn how to incorporate Firebase into our Flutter apps

Learn how to incorporate Firebase into our Flutter apps

Flash Chat ⚡️ Our Goal The objective of this tutorial is to learn how to incorporate Firebase into our Flutter apps. We'll be using Firebase Cloud Fir

Oct 27, 2021

Cooking apps - Cooking App made using flutter framework

Cooking apps - Cooking App made using flutter framework

cooking_apps Cooking App made using flutter framework. This template app contain

Jan 24, 2022

Mongolian vertical script widgets for Flutter apps

Mongolian vertical script widgets for Flutter apps

mongol This library is a collection of Flutter widgets for displaying traditional Mongolian vertical text. The primary widgets include: MongolText: ve

Dec 12, 2022

fl_heatmap - A heatmap build for Flutter apps

fl_heatmap - A heatmap build for Flutter apps

fl_heatmap - A heatmap build for Flutter apps

Sep 19, 2022

Google UI is an open-source UI library for developing cross-platform apps using Flutter with Material Design 2.0

Google UI is an open-source UI library for developing cross-platform apps using Flutter with Material Design 2.0

Google UI Google UI is an open-source UI library for developing cross-platform apps using Flutter with "Material Design 2.0" Table of contents Install

Dec 24, 2022

A collection of sample apps that use Stream

A collection of sample apps that use Stream

Flutter samples Quick Links Register to get an API key for Stream Chat Flutter Chat Tutorial Chat UI Kit Flutter SDK Repo What is Stream? Stream allow

Dec 21, 2022

A set of counter apps made for #FlutterCounterChallenge2020

flutter_counter_challenge_2020 A set of counter apps made for #FlutterCounterChallenge2020. Run flutter create . inside the repository after cloning i

Dec 30, 2022

Ensiklopedi Multiplatform Apps

ensiklopedi A new Flutter project. Getting Started This project is a starting point for a Flutter application. A few resources to get you started if t

Dec 9, 2021
Comments
  • example

    example

    help me with a working sample because i have tried but i get. I/flutter ( 3447): ┌─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── I/flutter ( 3447): │ #0 UgandaMobileMoney.chargeClient (package:uganda_mobile_money/client.dart:36:15) I/flutter ( 3447): │ #1 I/flutter ( 3447): ├┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄┄ I/flutter ( 3447): │ ⛔ type 'Null' is not a subtype of type 'Map<String, dynamic>' I/flutter ( 3447): └─────────────────────────────────────────────────────────────────────────────────────────────────────────────────────── I/flutter ( 3447): Something Went wrong

    opened by bill130 0
Owner
null
A basic demo example for integrating between Appwrite & Flutter 💙

?? Quiz With Flutter A simple Quiz App built with Flutter and Appwrite ?? Getting Started ?? Install Appwrite Follow our simple Installation Guide to

Appwrite 35 Nov 22, 2022
A basic demo example for integrating between Appwrite & Flutter 💙

?? Todo With Flutter A simple todo app built with Flutter and Appwrite ?? Getting Started Appwrite is an end-to-end backend server for Web, Mobile, Na

Appwrite 27 Dec 15, 2022
A flutter app helps to keep track of what money is spent in order to help save

HaslTy This application helps to keep track of what money is spent in order to help save. Tools State management (BLoC). Local database (sqflite packa

Ahmed Khairy 4 Oct 29, 2021
Flutter OSM - OSM Plugin For Flutter Apps

flutter_osm_plugin osm plugin for flutter apps (only Android for now, iOS will b

null 1 Mar 29, 2022
Easy and Fast internationalization for your Flutter Apps

Easy and Fast internationalization for your Flutter Apps Why easy_localization? ?? Easy translations for many languages ?? Load translations as JSON,

Aye7 672 Dec 18, 2022
Prove your identity on demand and manage your finance with Flutter

Identt-User-Flutter IdenTT Prove your identity on demand and manage your finance. View Admin Panel Demo || View App Demo About The Project Problem: Mo

IdenTT 4 May 17, 2022
mezza 0 Nov 24, 2021
Firebase + Flutter sample apps with code snippets, supported by comprehensive articles for each implementation.

FlutterFire Samples This repo is created to contain various sample apps demonstrating the integration of Firebase with Flutter. The final goal is to c

Souvik Biswas 186 Dec 24, 2022
A flutter clean architecture series, the way we build clean apps.

Flutter Clean Archeticture Series ?? "Making the world a better place" ✅ Full Articles You can check out the full Medium articles on devmuaz ✅ Branche

AbdulMuaz Aqeel 267 Jan 4, 2023
Examples showing how to use Rid in order to build Dart/Flutter apps integrated with Rust.

Examples showing how to use Rid in order to build Dart/Flutter apps integrated with Rust.

Thorsten Lorenz 205 Dec 24, 2022