coopbank_pesalink 0.0.1 copy "coopbank_pesalink: ^0.0.1" to clipboard
coopbank_pesalink: ^0.0.1 copied to clipboard

Dart package for consuming Co-op bank Pesalink API

example/coopbank_pesalink_example.dart

import 'package:coopbank_pesalink/coopbank_pesalink.dart';

void main() async {
  String accessToken() {
    return 'your token';
  }

  var coopPesalink = CoopPesalink(baseAccountNo: '36001873000');

  // pesalink
  BankReponse bankReponse = await coopPesalink.pesaLink(
      referenceNumber: 'bcsjsgcjscjbsdjbvdvjrdfi',
      accountNumber: '{accountNumber}',
      bankCode: '{bankCode}',
      amount: 50,
      callBackUrl: '{callBackUrl}',
      transactionDescription: '{transactionDescription}',
      accessToken: accessToken());

  print(bankReponse.rawResponceBody);

  // fetch latest 10 transactions
  BankReponse bankReponseTransactions = await coopPesalink.trancations(
      referenceNumber: 'bcsjsgcjscjbsdjbvdvjrdfi',
      noOfTransactions: 10,
      accessToken: accessToken());

  print(
      bankReponseTransactions.rawResponceBody); // print the whole response body
  print(bankReponseTransactions
      .transactions); // print the the lis of transactions [List<BankTransactionModel>]
}
2
likes
110
pub points
0%
popularity

Publisher

verified publisherphan-tec.com

Dart package for consuming Co-op bank Pesalink API

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (LICENSE)

Dependencies

http

More

Packages that depend on coopbank_pesalink