Giter Site home page Giter Site logo

agnelselvan / upi_payment_qrcode_generator Goto Github PK

View Code? Open in Web Editor NEW
14.0 3.0 4.0 555 KB

Generates the QRCode for UPI Payment Flutter

Home Page: https://pub.dev/packages/upi_payment_qrcode_generator

License: MIT License

Kotlin 2.73% Ruby 7.76% Swift 4.57% Objective-C 1.49% Dart 19.13% HTML 3.39% CMake 20.55% C++ 36.07% C 2.40% Java 0.99% Shell 0.92%
flutter dart payment upi upi-qrcode-generator upi-qr-code upi-payment upi-payment-qrcode-generator

upi_payment_qrcode_generator's Introduction

UPI Payment QRCode Generator.

This Plugin mainly focus on the generation of UPI Payment QRCode, so that the user can scan the QRCode for paying the specific amount of money using UPI.

pub package

last.mp4

UPI Payment QRCode without amount specified UPI Payment QRCode with amount specified

Features

Use this plugin in Flutter app too:

  • Make a UPI Payment to a Payee of specific amount of money by scanning the QRCode generated by this plugin.
  • You can generate a UPI Payment QRCode without entering specific amount, so that user can pay the amount they want to send.
  • You can add your branding Logo in QRCode.

Platform Support

Android iOS MacOS Web Linux Windows
✔️ ✔️ ✔️ ✔️ ✔️ ✔️

Installation

In the dependencies: section of your pubspec.yaml, add the following line:

    dependencies:
        upi_payment_qrcode_generator: <latest_version>

Getting Started

Step 1

Import the Package:

import 'package:upi_payment_qrcode_generator/upi_payment_qrcode_generator.dart';

Step 2

Create UPIDetails Object.

final upiDetails = UPIDetails(upiID: "UPI ID", payeeName: "Payee Name", amount: 1);

Here, UPIDetails contains requires a set of properties where,

  • upiID value is required we need to pass the UPI ID or Virtual Payment Address(VPA) e.g 712534798@paytm
  • payeeName value is required, pass the payeeName or the Business Name
  • amount value is optional, if amount has value then the user cannot change the amount while transferring else the user can send the amount as per the user required.
  • transactionID value is optional, Transation ID is generated by the payment Service Provider. NOTE: Transaction ID has to be unique in each transaction otherwise, transaction results in Payment Failed
  • transactionNote value is optional, This is specially for the note you want to send while transferring the amount.
  • currencyCode value is optional, Default value is INR

NOTE: UPI Transaction will operate only in INR.

Step 3

Include this widget in you Widget Tree

UPIPaymentQRCode(upiDetails: upiDetails, size: 200,),

Here, UPIPaymentQRCode contains requires a set of properties,

  • upiDetails value is required we need to pass the UPI Details

Include Branding Logo in QRCode

Include this widget in you Widget Tree

  UPIPaymentQRCode(
    upiDetails: upiDetails, 
    size: 200,
    embeddedImagePath: 'assets/images/logo.png',
    embeddedImageSize: const Size(60, 60),
  ),

Here, UPIPaymentQRCode contains requires a set of properties,

  • upiDetails value is required we need to pass the UPI Details.
  • embeddedImagePath value is needed for passing the branding logo.
  • embeddedImageSize is for giving width and height to the embeddedImagePath.

Don't Forget to give Star and Like 🚀

upi_payment_qrcode_generator's People

Contributors

agnelselvan avatar agnelselvan007 avatar itsmeuseless avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

upi_payment_qrcode_generator's Issues

QR code not regenerate based on onchange method

Hi,

         I have two upi Id's GPay and PhonePe Radio group options. I want to generate QR code based on selected option. I am unable to regenerate (refreshing) QR Code with below code. It is always showing initial  UPI data (first option) only.

onChanged: (value) {
setState(() {
selectedUPIPayment = value;
upiDetails = UPIDetails(
upiID: selectedUPIPayment!.upi!,
payeeName: selectedUPIPayment!.acntName!,
transactionID: "",
);
});
},

please help me.

How can I use this on PHP

I want to generate qr code dynamically on my php based website.
Can somebody please describe how can I implement it?
Thanks

Flutter 3.10.0, Dart 3.0.0. Incompatible

ERROR: The argument type 'QrImage' can't be assigned to the parameter type 'Widget?'.

lib/src/root/upi_qrcode.dart:69:14

69 │ child: QrImage(
│ ┌──────────────^
70 │ │ data: upiDetails.qrCodeValue,
71 │ │ version: QrVersions.auto,
72 │ │ size: size,
73 │ │ gapless: false,
74 │ │ errorStateBuilder: qrErrorStateBuilder,
75 │ │ errorCorrectionLevel:
76 │ │ upiQRErrorCorrectLevel?.value ?? UPIQRErrorCorrectLevel.high.value,
77 │ │ embeddedImage:
78 │ │ embeddedImagePath != null ? AssetImage(embeddedImagePath!) : null,
79 │ │ embeddedImageStyle: QrEmbeddedImageStyle(
80 │ │ size: embeddedImageSize ?? const Size(40, 40),
81 │ │ ),
82 │ │ ),
│ └───────^

ERROR: 1 positional argument expected by 'QrImage.new', but 0 found.

lib/src/root/upi_qrcode.dart:70:9

70 │ data: upiDetails.qrCodeValue,
│ ^^^^

UPI QR code is not working for PhonePe UPI ID by scanning in PhonePe app

Hi,
I have a code, where I have given my phonepe upi id and payee name, QR code got generated, but whenever I am scanning that QR code in phonepe app, it is showing warning like 'Unable to verify QR / Invalid QR', suppose if I scan the same QR in paytm or Gpay, it is working.

Issue : PhonePe UPI ID configured, unable to scan the QR in PhonePe app itself, It's not supporting,

Can you help me on this.

callback

how can get payment success callback

Flutter app fails to compile because of the older version of Kotlin in your library.

FAILURE: Build failed with an exception.

* What went wrong:
The Android Gradle plugin supports only Kotlin Gradle plugin version 1.5.20 and higher.
The following dependencies do not satisfy the required version:
project ':upi_payment_qrcode_generator' -> org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50

We are using v1.7.10 of the Kotlin which is latest currently along with v7.3.1 of the AGP in the Android module of our Flutter project.

Please upgrade your Kotlin version to the latest one possible. This is issue is blocking us to upgrade our Android project with the latest version of AGP, and other dependencies.

upi_payment_qrcode_generator not responding the payment is done or not.

i have implemented upi_payment_qrcode_generator: ^ . With the help of QR code the payment is done by cranner side. but not responding by QR code generater side. I'm not able to get the recode of response that payment is successfully done OR Failed.

import 'package:flutter/material.dart';
import 'package:upi_payment_qrcode_generator/upi_payment_qrcode_generator.dart';

class PaymentForWindowMacos extends StatefulWidget {
  const PaymentForWindowMacos({Key? key}) : super(key: key);

  @override
  State<PaymentForWindowMacos> createState() => _PaymentForWindowMacosState();
}

class _PaymentForWindowMacosState extends State<PaymentForWindowMacos> {
  final upiDetails = UPIDetails(
    upiID: "......@okicici",
    payeeName: "Payee Name Here",
    amount: 1,
    transactionNote: "Hello World",
  );
  final upiDetailsWithoutAmount = UPIDetails(
      upiID: "....@okicici",
      payeeName: "Payee Name Here",
      transactionNote: "Hello World");

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('UPI Payment QRCode Generator'),
        ),
        body: Center(
          child: Column(
            mainAxisAlignment: MainAxisAlignment.center,
            children: [
              const Text("UPI Payment QRCode without Amount",
                  style: TextStyle(fontWeight: FontWeight.bold)),
              UPIPaymentQRCode(
                upiDetails: upiDetailsWithoutAmount,
                size: 200,
                loader: const Center(
                  child: CircularProgressIndicator(),
                ),
              ),
              Text(
                "Scan QR to Pay",
                style: TextStyle(color: Colors.grey[600], letterSpacing: 1.2),
              ),
              const SizedBox(
                height: 20,
              ),
              const Text(
                "UPI Payment QRCode with Amount",
                style: TextStyle(fontWeight: FontWeight.bold),
              ),
              UPIPaymentQRCode(
                upiDetails: upiDetails,
                size: 200,
                loader: const Center(
                  child: CircularProgressIndicator(),
                ),
              ),
              Text(
                "Scan QR to Pay",
                style: TextStyle(color: Colors.grey[600], letterSpacing: 1.2),
              )
            ],
          ),
        ),
      ),
    );
  }
}

Thank you

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.