GithubHelp home page GithubHelp logo

sunsreng / aba_payment Goto Github PK

View Code? Open in Web Editor NEW

This project forked from kechankrisna/aba_payment

0.0 0.0 0.0 547 KB

License: Apache License 2.0

Ruby 3.04% C++ 19.26% C 0.83% PHP 7.72% Objective-C 0.04% Kotlin 0.31% Dart 50.15% Swift 1.59% HTML 2.19% CMake 11.28% Blade 3.59%

aba_payment's Introduction

aba_payment

This package will allow developer integrate their flutter app with aba payway easily. This plugin use WebView for embeding web content checkout and url_launcher to open schema for both ios and android.

Support :

  • ✓ Android Minimum SDK Version: 21
  • ✓ IOS minimum target Version: 12

Payment Option:

Classes:

Widgets:

  • ABACheckoutContainer():A completed widget which allow user intergrate ABA Payment into their flutter app easily

Available methods:

  • onBeginCheckout(ABATransaction transaction): Triggered when user pressed checkout button.
  • onFinishCheckout(ABATransaction transaction): Triggered when after user pressed checkout button and transaction is created successfully.
  • onBeginCheckTransaction(ABATransaction transaction): Triggered when user completed transaction payment and current transaction will be started to check if it success or failed.
  • onFinishCheckTransaction(ABATransaction transaction): Triggered when user completed transaction payment and current transaction checking event is finished.
  • onCreatedTransaction(int value, String msg): Triggered when user completed transaction payment and current transaction checking event is finished.
  • onPaymentSuccess(ABATransaction transaction): Triggered when payment transaction was completed successfully. User can route to another screen after successfully. By default navigated to ABACheckoutSuccess()
  • onPaymentFail(ABATransaction transaction): Triggered when payment transaction was uncompleted. User can show any message.

Example:

ABACheckoutContainer(
    amount: _total,
    shipping: _shipping,
    firstname: _firstname,
    lastname: _lastname,
    email: _email,
    phone: _phone,
    items: [..._items.map((e) => e.toMap()).toList()],
    checkoutApiUrl: _checkoutApiUrl,
    merchant: _merchant,
    onBeginCheckout: (transaction) {
      setState(() => _isLoading = true);
      EasyLoading.show(status: 'loading...');
    },
    onFinishCheckout: (transaction) {
      setState(() => _isLoading = false);
      EasyLoading.dismiss();
    },
    onBeginCheckTransaction: (transaction) {
      setState(() => _isLoading = true);
      EasyLoading.show(status: 'loading...');
      print("onBeginCheckTransaction ${transaction.toMap()}");
    },
    onFinishCheckTransaction: (transaction) {
      setState(() => _isLoading = false);
      EasyLoading.dismiss();
      print("onFinishCheckTransaction ${transaction.toMap()}");
    },
    enabled: !_isLoading,
    // onPaymentFail: (transaction) {
    //   print("onPaymentFail ${transaction.toMap()}");
    // },
    // onPaymentSuccess: (transaction) {
    //   print("onPaymentSuccess ${transaction.toMap()}");
    // },
)
  • Completed Cart Screen: This file will demonstrate you how to intergrate your flutter app with payway mobile

Configuration on Server Side

  • PHP: This file will tell you each step to config your php code on server side

aba_payment's People

Contributors

kechankrisna 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.