1.0.4 • Published 9 months ago

@omkarbhosale/upiqr v1.0.4

Weekly downloads
-
License
ISC
Repository
-
Last release
9 months ago

Official Documentation

Install the package using the following command

npm i @omkarbhosale/upiqr

Once the package is installed, you can import the library using import:

import generateQR from "@omkarbhosale/upiqr";

Example

// Import the package
import generateQR from "@omkarbhosale/upiqr";

// Async funtion is required to generate the QR and retrun the promise as Base64 URL

const qrData = async () => {
  try {
    // Get the Base64 string by using generateQR() function.
    // UPI_ID accepts the UPI ID where to recive money in
    // AMOUNT must be an integer or float.

    let data = await generateQR({ UPI_ID: "omkar@upi", AMOUNT: 1234 });

    // The above code will generate and return the Base64 Code
    console.log(data);
  } catch (error) {
    console.error("Error generating QR code:", error);
  }
};

qrData();

Authors

1.0.4

9 months ago

1.0.3

10 months ago

1.0.2

11 months ago

1.0.1

11 months ago

1.0.0

11 months ago