quick_payment 0.0.3
quick_payment: ^0.0.3 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
PaymentMethodclass 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,
customerName: "Khalid",
feePercentage: 2.5,
methods: [
PaymentMethod.bkash("016xxxxxxxx"),
PaymentMethod.nagad("017xxxxxxxx"),
PaymentMethod.rocket("018xxxxxxxx"),
PaymentMethod.upay("019xxxxxxxx"),
],
onPaymentSubmitted: (data) {
print(data.toMap());
},
);
},
child: const Text("Pay Now"),
),
),
);
}
}
Assets #
All payment logos are included under assets/payment/. You can use them in your UI.
Make sure your pubspec.yaml includes:
License #
This project is licensed under the MIT License – see the LICENSE file for details.
Links #
- Homepage: GitHub Repository
- Issue Tracker: Report Issues