Skip to content

rbunpat/Simple-Promptpay-QR

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple-Promptpay-QR

Deploy with Vercel Deploy with Vercel

Express QR Code Generator

This is a simple Express project that generates QR codes for promptpay payments. It utilizes the qrcode library to generate QR codes and the promptpay-qr library to create the payload for promptpay payments.

Development

To get started with this project, follow these steps:

  1. Clone the repository:

    git clone https://github.com/rbunpat/Simple-Promptpay-QR.git
    cd Simple-Promptpay-QR
  2. Install dependencies:

    npm install
  3. Run the server:

    node index.js

    The server will start running on http://localhost:3000.

API Endpoint

The main functionality is exposed through the /qr endpoint. You can generate a promptpay QR code by making a GET request to this endpoint with the required parameters.

Example:

GET http://localhost:3000/qr?amount=100&number=0812345678
  • amount: The amount for the promptpay payment.
  • number: The mobile number associated with the promptpay account.

The response will be a PNG image containing the generated QR code for the specified promptpay payment.

Dependencies

  • express: Web framework for Node.js.
  • qrcode: QR code generation library.
  • promptpay-qr: Library for generating promptpay QR code payloads.

Contributing

Feel free to contribute to this project by opening issues or submitting pull requests. Your contributions are welcome!

License

This project is licensed under the MIT License - see the LICENSE file for details.

About

A simple PromptPay QR generator you can deploy on Vercel

Topics

Resources

License

Stars

Watchers

Forks