pub package codecov

Comet payone for Flutter package to connect to bcel, developed by comet.

The package will generate qrcode for payment and tracking transaction status.


add the following code to your pubspec.yaml :

  comet_payone: ^2.0.0


import the package

import 'package:flutter_payone/constants.dart';
import 'package:flutter_payone/flutter_payone.dart';

Register your shop with mcid and subcribeKey which will be granted by BCEL

Future<String> initStore() async {
    String mcid = "mch6066c3a96b789";
    String applicationId = "ONEPAY";
    String bankName = "BCEL";
    Country country = Country.lao;
    Province province = Province.vientiane;
    String subscribeKey = "sub-c-91489692-fa26-11e9-be22-ea7c5aada356";
    String terminalid = "12345678";

    return await FlutterPayone.initStore(mcid, province,
          subscribeKey, terminalid, country, bankName, applicationId);

Generate QR Code, example: amount = 1 and LAK currency. You also can add a description to the QR Code which will accept string value.

Future<String> buildQrcode() async {
    int amount = 1;
    Currency currency = Currency.laoKip;
    String description = "";
    return  await FlutterPayone.buildQrcode(amount, currency, description);

Now you can start tracking transaction, expect transaction response are customer name, paid amount, etc.

  Future<String> startObserve() async {
    return await FlutterPayone.startObserve();