Giter Club home page Giter Club logo

flutter_payone's Introduction

comet_payone

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.

Installation

add the following code to your pubspec.yaml :

dependencies:
  comet_payone: ^2.0.0

Usage

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();
  }

flutter_payone's People

Contributors

arnaudatagilityfeat avatar seau-comet avatar xok-comet avatar arno-dev avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.