mvola 0.1.0-dev.1 copy "mvola: ^0.1.0-dev.1" to clipboard
mvola: ^0.1.0-dev.1 copied to clipboard

outdated

A MVola API client for dart and eventually flutter.

example/mvola_example.dart

import 'package:mvola/mvola.dart';
import 'package:dotenv/dotenv.dart';
import 'package:mvola/src/constants.dart';

void main() async {
  var env = DotEnv(includePlatformEnvironment: true)..load();

  var mvola = MVolaClient(
    env['DEV_ENV'] == '1' ? sandboxUrl : productionUrl,
    env['CONSUMER_KEY']!,
    env['CONSUMER_SECRET']!,
  );

  await mvola.generateAccessToken();

  var transactionResponse = await mvola.initTransaction(
    'gvola',
    '0343500004',
    5000,
    '0343500003',
  );
  print(transactionResponse);

  var transactionStatus = await mvola.getTransactionStatus(transactionResponse.serverCorrelationId, '0343500004', 'gvola');
  print(transactionStatus);

  var transaction = await mvola.getTransactionDetail("636838929", "gvola", "0343500004");
  print(transaction);  
}
5
likes
0
points
33
downloads

Publisher

unverified uploader

Weekly Downloads

A MVola API client for dart and eventually flutter.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

http, uuid

More

Packages that depend on mvola