Welcome to dart-mesomb 👋

Version Documentation License: MIT Twitter: hachther

dart client for mobile payment (Orange Money, Mobile Money ...) with MeSomb services.

You can check the full documentation of the api here

🏠 Homepage

Install

dart pub add mesomb

Usage

Below some quick examples

Collect money from an account

import 'package:mesomb/mesomb.dart';

void main() async {
 final payment = PaymentOperation(
  '<applicationKey>',
  '<AccessKey>',
  '<SecretKey>',
 );
 final response = await payment.makeCollect({
   'amount': 100,
   'service': 'MTN',
   'payer': '677550203',
   'nonce': RandomGenerator.nonce(),
 });
 print(response.isOperationSuccess());
 print(response.isTransactionSuccess());
}

Depose money in an account

import 'package:mesomb/mesomb.dart';
void main() async {
  var payment = PaymentOperation(
    '<applicationKey>',
    '<AccessKey>',
    '<SecretKey>',
  );
  final response = await payment.makeDeposit({
    'amount': 100,
    'service': 'MTN',
    'receiver': '677550203',
    'nonce': RandomGenerator.nonce(),
  });
  print(response.isOperationSuccess());
  print(response.isTransactionSuccess());
}

Get application status

import 'package:mesomb/mesomb.dart';

void main() async {
  var payment = PaymentOperation(
    '<applicationKey>',
    '<AccessKey>',
    '<SecretKey>',
  );
  final application = await payment.getStatus(DateTime.now());
  print(application);
}

Get transactions by IDs

import 'package:mesomb/mesomb.dart';

void main() async {
  var payment = PaymentOperation(
    '<applicationKey>',
    '<AccessKey>',
    '<SecretKey>',
  );

  var transactions = await payment.getTransactions(['ID1', 'ID2'], null);

  print(transactions);
}

Author

👤 Hachther LLC contact@hachther.com

Show your support

Give a ⭐️ if this project helped you!

Libraries

mesomb