ldb_qr_payment 1.0.0 copy "ldb_qr_payment: ^1.0.0" to clipboard
ldb_qr_payment: ^1.0.0 copied to clipboard

retractedoutdated

Flutter plugin for LDB QR Payment Lao Development Bank

Features #

Lao Development Bank E-Commerce payment

  • generate qr code for scan payment with app LDB Trust
  • deeplink payment with app LDB Trust
  • check status payment with public key

TODO:

  • Check status transaction

Getting started #

ຂັ້ນຕອນການຂໍຊຳລະເງິນ online ຜ່ານ LDB QR Payment:

  • ເຮັດໃບສະເຫນີເຂົ້າມາຂໍເຊື່ອມຕໍ່ QR payment ກັບ ທະນາຄານພັດທະນາລາວ
  • ເຈລະຈາຕົກລົງຄ່າທຳນຽມ ແລະ ການເຊັນສັນຍາຮ່ວມມື
  • ຝາຍໄອທີຈະສ້າງ Merchant ID ໃຫ້ເພື່ອຊຳລະເງິນແທ້

Usage #

ລຸ່ມນີ້ແມ່ນ Example Code ທ່ານສາມາດນຳໄປທົດລອງໄດ້ທັນທີ

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

class MyApp extends StatelessWidget {
  const MyApp({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      title: 'LDB QR Payment',
      theme: ThemeData(
        primarySwatch: Colors.blue,
      ),
      home: const LDBPAY(),
    );
  }
}

//for example
class LDBPAY extends StatefulWidget {
  const LDBPAY({Key? key}) : super(key: key);

  @override
  State<LDBPAY> createState() => _LDBPAYState();
}

class _LDBPAYState extends State<LDBPAY> {
  late String linkPayment = '',
      qrScan = '';

  @override
  void initState() {
    // TODO: implement initState
    super.initState();
    getQRcode();
  }

  void getQRcode() async {
    // Note: Parameter
    // 1 merchId
    // 2 merchRef
    // 3 amount
    // 4 additional
    // 5 urlBack
    // 6 urlCallBack
    // 7 remark
    final dataQR = await LDBPayment().getQR(
        'LDB0302000001',
        'merchRef 22',
        1,
        'additional 44',
        'urlBack 55',
        'urlCallBack 66',
        'remark77');
    print(dataQR);

    setState(() {
      linkPayment = dataQR['link'];
      qrScan = dataQR['qr'];
    });
  }

  @override
  Widget build(BuildContext context) {
    return Container(
      child: Scaffold(
        body: SafeArea(
          child: ListView(
            children: [
              InkWell(
                onTap: () {},
                child: Image.network(qrScan),
              ),
              Container(
                margin: const EdgeInsets.all(10),
                child: MaterialButton(
                  color: Colors.blue,
                  onPressed: () {
                    getQRcode();
                  },
                  child: Text('GET LDB QR PAYMENT'),
                ),
              ),
            ],
          ),
        ),
      ),
    );
  }
}

Additional information #

4
likes
0
points
12
downloads

Publisher

verified publisherpitidev.com

Weekly Downloads

Flutter plugin for LDB QR Payment Lao Development Bank

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

http

More

Packages that depend on ldb_qr_payment