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.
To get started with this project, follow these steps:
-
Clone the repository:
git clone https://github.com/rbunpat/Simple-Promptpay-QR.git cd Simple-Promptpay-QR
-
Install dependencies:
npm install
-
Run the server:
node index.js
The server will start running on
http://localhost:3000
.
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.
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.
express
: Web framework for Node.js.qrcode
: QR code generation library.promptpay-qr
: Library for generating promptpay QR code payloads.
Feel free to contribute to this project by opening issues or submitting pull requests. Your contributions are welcome!
This project is licensed under the MIT License - see the LICENSE file for details.