Git Product home page Git Product logo

bkash-pgwclient-demo-flutter's Introduction

Easy bKash integration with Flutter

GitHub license PRs Welcome Maintenance Open Source Love svg1 made-with-love

A simple implementation of bKash payment gateway in flutter with tokenized checkout feature.

Features

  • A Simple App with a button to Checkout
  • Pressing the button initiates bKash payment dialogs
  • Returns a success message with tranId if payment is successful

Usage

Official link for API documentation and demo checkout

Production

Replace the credentials for production uses in app_constants.dart with your own bKash credentials and change the flag isProduction = true.

  static const String username = 'app_username';
  static const String password = 'app_password';
  static const String appKey = 'app_key';
  static const String appSecret = 'app_secret';

Pay With bKash

Basically this the implementation of payment without an agreement. Use the makePayment method to pay

Request

final result = await makePayment(
    amount: '50.0',
    payerReference: '01770618575',
    merchantInvoiceNumber: 'invoice02',
  );

Response

{
    "trxId": "BBE40GR28Q",
    "paymentId": "TR0011QoLvETc1707888323866",
    "executeTime": "2024-02-14T11:25:40:749",
    "payerReference": "01770618575",
    "customerMsisdn": "01770618575",
    "merchantInvoiceNumber": "invoice02"
}

Error Handling

In case of any error it's throw PaymentException. You can handle the exception using a try-catch block.

try {
  // Make a payment
} on PaymentException catch (e) {
  // Handle the error
  log(e.message);
}

Video Demo

bkash_demo.mp4

Contributing

Contributions to this project you always are welcome. Please note the standard guidelines before submitting your pull request.

bkash-pgwclient-demo-flutter's People

Contributors

chayanforyou avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

bkash-pgwclient-demo-flutter's Issues

Build failed Flutter 3.0.4

Please upgrade it for flutter null safety.
I try to add it to my flutter app but failed cause of null safety.

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.