A non-official package to use QOSIC on your Dart and Flutter app

Overview

Qosic Dart

style: very good analysis Powered by Mason License: MIT

A Very Good Project created by Very Good CLI.

About ❓

This package is a simple way to handle Qosic's USSD payment. It allows you to integrate mobile money payment into your Dart and Flutter app.

🚨 WARNING 🚨 This client should only be used on the server side.

Installation 💻

❗ In order to start using Qosic Dart you must have the Dart SDK installed on your machine.

Add qosic_dart to your pubspec.yaml:

dependencies:
  qosic_dart:

Install it:

dart pub get qosic_dart

Usage 🔨

Make a payment

A simple example of how to compute a USSD payment with QOSIC

final qosic = QosicDart(
  moovKey: 'XXXXXXXXXx',
  mtnKey: 'XXXXXXXXXX',
  username: 'XXXXXXXXXX',
  password: 'XXXXXXXXX',
);

final transactionRef = await qosic.pay(
    network: QosicNetwork.mtn,
    phoneNumber: 'XXXXXXXX', /// precedeed by the country code. ex: 229XXXXXXXX
    amount: '1',
  );

Timer.periodic(
    const Duration(
      seconds: 10, /// feel free to give your own second to wait
                   /// but I will advice you between 7 and 10 secs
    ),
    (timer) async {
      final status = await qosic.getPaymentStatus(
        transactionReference: transactionRef!,
        network: QosicNetwork.mtn,
        country: QosicCountry.benin,
      );

      if (status == QosicStatus.successfull || status == QosicStatus.failed) {
        timer.cancel();
        if (status == QosicStatus.successfull) {
          log("Success for payment");
        } else {
          log("Payment failed");
        }
      }
    },
);

Continuous Integration 🤖

Qosic Dart comes with a built-in GitHub Actions workflow powered by Very Good Workflows but you can also add your preferred CI/CD solution.

Out of the box, on each pull request and push, the CI formats, lints, and tests the code. This ensures the code remains consistent and behaves correctly as you add functionality or make changes. The project uses Very Good Analysis for a strict set of analysis options used by our team. Code coverage is enforced using the Very Good Workflows.


Running Tests 🧪

To run all unit tests:

dart pub global activate coverage 1.2.0
dart test --coverage=coverage
dart pub global run coverage:format_coverage --lcov --in=coverage --out=coverage/lcov.info

To view the generated coverage report you can use lcov.

# Generate Coverage Report
genhtml coverage/lcov.info -o coverage/

# Open Coverage Report
open coverage/index.html
You might also like...

Koel Player, the official mobile app for Koel

Koel Player, the official mobile app for Koel

Koel Player The mobile app for Koel, which provides a complete mobile app experience and doesn't have the limitations of the mobile web version. Suppo

Dec 27, 2022

OneAppFlutter - An official event app for HackRU

OneAppFlutter - An official event app for HackRU

One App Flutter The Official HackRU Flutter App Feel free to show some ❤️ and ⭐ the repo to support the project. Description What is the purpose of th

Dec 10, 2022

Official Flutter Tracking Library for Mixpanel Analytics

Official Flutter Tracking Library for Mixpanel Analytics

Table of Contents Introduction Quick Start Guide Install Mixpanel Initialize Mixpanel Send Data Check for Success I want to know more! Introduction We

Jan 4, 2023

Integration test - Copy of the official Flutter integration test plugin

integration_test This package enables self-driving testing of Flutter code on de

Jan 5, 2022

Flutter plugin for playing or streaming YouTube videos inline using the official iFrame Player API

Flutter plugin for playing or streaming YouTube videos inline using the official iFrame Player API

Flutter plugin for playing or streaming YouTube videos inline using the official iFrame Player API. The package exposes almost all the API provided by iFrame Player API. So, it's 100% customizable.

May 15, 2022

Official Getx CLI

Documentation languages pt_BR en_US - this file zh_CN Official CLI for the GetX™ framework. // To install: pub global activate get_cli // (to use thi

Jan 8, 2023

Official Sonr Blockchain Node implementation with Frontend Clients to access Wallet.

Sonr Blockchain Sonr-Chain is a blockchain built using Cosmos SDK and Tendermint and created with Starport. Get started starport chain serve serve com

Dec 29, 2022

The official mobile application for Hestia '22 is the annual techno-cultural fest of TKM College of Engineering, Kollam.

The official mobile application for Hestia '22 is the annual techno-cultural fest of TKM College of Engineering, Kollam.

made with Flutter Hestia'22 App The official mobile application for Hestia '22 is the annual techno-cultural fest of TKM College of Engineering, Kolla

Nov 16, 2022
Releases(v1.0.0)
Owner
Elikem (Junior) Medehou
Building products from Africa to the World 🦄 | Fluently speaking Dart 💙 and TypeScript
Elikem (Junior) Medehou
Flutter's compute function made available for all non-Flutter Dart programs

compute Flutter's compute function made available for all non-Flutter Dart programs The compute package takes Flutter's compute function and makes it

dartside.dev 6 Nov 10, 2022
Stream Chat official Flutter SDK. Build your own chat experience using Dart and Flutter.

Official Flutter packages for Stream Chat Quick Links Register to get an API key for Stream Chat Flutter Chat SDK Tutorial Chat UI Kit Sample apps Thi

Stream 659 Dec 25, 2022
No official getnet package for flutter

get_net Package to do payments using api getnet Getting Started This project is a starting point for a Dart package, a library module containing code

null 1 Jun 19, 2022
An API of the official Django polls tutorial with Dart-Frog 🐸

polls_api ?? Description A polls api using dart_frog. localhost/polls localhost/polls/[id] ☢️ This is a sample project and dart_frog is currently expe

Samuel Abada 4 Sep 20, 2022
The official open source app of the GSDCs of Benin. Feel free to contribute and make this app great for every members

GDSC-Events-Benin The official open source app of the GSDCs of Benin. Feel free to contribute and make this app great for every members ?? Contributor

Junior Medehou 2 Feb 4, 2022
A powerful official extension library of Tab/TabBar/TabView, which support to scroll ancestor or child Tabs when current is overscroll, and set scroll direction and cache extent.

extended_tabs Language: English | 中文简体 A powerful official extension library of Tab/TabBar/TabView, which support to scroll ancestor or child Tabs whe

FlutterCandies 185 Dec 13, 2022
AMURoboclub is the official app of AMURoboclub, a student body of ZHCET that nurtures the needs of curious and innovative minds

AMURoboclub is the official app of AMURoboclub, a student body of ZHCET that nurtures the needs of curious and innovative minds. It is the nerve center of robotics enthusiasts who are curious and innovative and wish to come together to learn and share. With the motto 'Where Innovation Meets Implementation', it endeavors to ignite young minds with the fuel of robotics. Enabling that, the app ensures to acquaint its users with the various activities and achievements of AMURoboclub.

AMU Roboclub 9 Dec 6, 2022
A TabBarController that is easy to use for flutter developers. 🥰 It supports various styles of page navigation, and you can also use it to customize your favorite styles. 🍻🍻

easy_tab_controller A user-friendly TabBarController widget for flutter developer. Getting Started This project is a starting point for a Flutter plug

圆号本昊 3 May 26, 2022
A collection of pixel-perfect iOS-styled components and properties for Flutter, following the official guidelines.

cupertinew ⚠️ Experimental and work in progress ⚠️ A collection of pixel-perfect iOS-styled components and properties for Flutter, following the offic

Jeroen Meijer (Jay) 30 Nov 10, 2022
PotatoNotes - POSP official notes app written in flutter

Leaflet POSP official notes application, written in flutter, beautiful, fast and secure. Main features Material design Completely cross platform List/

Potato Open Sauce Project 311 Jan 2, 2023