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

Flutter SDK for accepting Bangladeshi manual mobile banking payments like bKash, Nagad, Rocket, and Upay.

quick_payment #

Flutter SDK for accepting Bangladeshi manual mobile banking payments like bKash, Nagad, Rocket, and Upay.

Easily integrate mobile payment options into your Flutter app with ready-to-use classes, assets, and UI components.


Features #

  • Supports multiple payment methods: bKash, Nagad, Rocket, Upay
  • Simple PaymentMethod class for easy integration
  • Includes payment logos in assets
  • Lightweight and well-documented
  • Works with Flutter >=3.10.0

Installation #

Add the package to your pubspec.yaml:

dependencies:
  quick_payment:
    git:
      url: https://github.com/khalidlikhOn/quick_payment.git

Then run:

flutter pub get
Usage

This example demonstrates how to use QuickPayment with multiple payment methods in your Flutter app. Clicking the Pay Now button opens the payment dialog and handles submission callbacks.

import 'package:flutter/material.dart';
import 'package:quick_payment/core/_controller.dart';
import 'package:quick_payment/models/payment_method.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatelessWidget {
  const MyApp({super.key});

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: const HomePage(),
      debugShowCheckedModeBanner: false,
    );
  }
}

class HomePage extends StatelessWidget {
  const HomePage({super.key});

  @override
  Widget build(BuildContext context) {
    return Scaffold(
      appBar: AppBar(title: const Text("Quick Payment Example")),
      body: Center(
        child: ElevatedButton(
          onPressed: () {
            QuickPayment.pay(
              context: context,
              amount: 200, // Amount in BDT
              customerName: "Khalid",
              feePercentage: 2.5, // Optional processing fee
              methods: [
                PaymentMethod.bkash("016xxxxxxxx"),
                PaymentMethod.nagad("017xxxxxxxx"),
                PaymentMethod.rocket("018xxxxxxxx"),
                PaymentMethod.upay("019xxxxxxxx"),
              ],
              onPaymentSubmitted: (data) {
                // Payment submission callback
                print(data.toMap());
              },
            );
          },
          child: const Text("Pay Now"),
        ),
      ),
    );
  }
}


This project is licensed under the MIT License – see the LICENSE
 file for details.
7
likes
0
points
147
downloads

Publisher

verified publisherkhalidlikhon.me

Weekly Downloads

Flutter SDK for accepting Bangladeshi manual mobile banking payments like bKash, Nagad, Rocket, and Upay.

Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

flutter, package_info_plus

More

Packages that depend on quick_payment