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

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

example/lib/main.dart

import 'package:flutter/material.dart';
import 'package:quick_payment/quick_payment.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: () {
            QuickPay.createPayment(
              context: context,
              amount: 200,
              customer: CustomerDetails(
                fullName: 'Khalid',
                email: 'khalid@gmail.com',
              ),
              credentials: QuickPayCredentials(
                  feePercentage: 1.8,
                  methods: [
                    PaymentMethod.bkash("016xxxxxxxx"),
                    PaymentMethod.nagad("017xxxxxxxx"),
                    PaymentMethod.rocket("018xxxxxxxx"),
                    //PaymentMethod.upay("019xxxxxxxx"),
                  ]
              ),
              onPaymentSubmitted: (data) {
                print(data.toMap());
              },
            );
          },
          child: const Text("Pay Now"),
        ),
      ),
    );
  }
}
7
likes
120
points
147
downloads

Documentation

API reference

Publisher

verified publisherkhalidlikhon.me

Weekly Downloads

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

License

MIT (license)

Dependencies

cupertino_icons, flutter, package_info_plus

More

Packages that depend on quick_payment