mesomb 1.0.5 copy "mesomb: ^1.0.5" to clipboard
mesomb: ^1.0.5 copied to clipboard

Dart client to perform mobile payment transaction with MeSomb. you can integrate the module into your application for payments

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!

4
likes
130
points
47
downloads

Publisher

verified publisherhachther.com

Weekly Downloads

Dart client to perform mobile payment transaction with MeSomb. you can integrate the module into your application for payments

Homepage

Documentation

API reference

License

BSD-3-Clause (license)

Dependencies

crypto, http

More

Packages that depend on mesomb