promptpay-qr

? Mobile web app (https://promptpay2.me), command line app, and JavaScript library to generate QR Code payload for PromptPay.

  • 所有者: dtinth/promptpay-qr
  • 平台:
  • 許可證: MIT License
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

Github星跟蹤圖

promptpay-qr npm version

Mobile web app, command line app, and JavaScript library to generate QR Code payload for PromptPay.

Introduction

The Bank of Thailand introduced a PromptPay QRCode Standard that works with most mobile banking apps in Thailand.

By generating a QR code, users of mobile banking apps can scan your QR code, and transfer money to your PromptPay account instantly.

In this repository:

What’s in a QR code

⚠️ Read this section to understand privacy implications of using PromptPay QR code ⚠️

  • The PromptPay QR code is based on EMV QRCPS Merchant Presented Mode specification.

  • The QR code contains the PromptPay ID. This means anyone who sees the QR code can find out your PromptPay ID (Phone number, National ID number, e-Wallet ID). Please treat the QR code like your personal information.

  • The QR code can optionally contain the transfer amount. Mobile banking apps use this number to pre-fill the amount for convenience.

Mobile web app

You can quickly receive money from your home screen.

For example, if you want to collect 80 Baht from each friend, you can open the app, type in 80, and show the QR code.
It takes less than 5 seconds.

To use it:

  1. Open Chrome (on Android) or Safari (iOS).

  2. Go to https://promptpay2.me/.

  3. Set your PromptPay ID.

  4. “Add to Home Screen.”

Features:

  • The app remembers your PromptPay ID, so you don’t have to enter the information each time.

  • It is a Progressive Web App, so you can add to home screen and it will work offline (Android).

  • No personal data is sent to any server. Your PromptPay ID stays in your phone/computer.

CLI

You can receive money from your terminal.

Install Node.js and run this command to install promptpay-qr in your machine:

npm install -g promptpay-qr

Run this command to generate a QR code:

promptpay-qr 081-xxx-xxxx
promptpay-qr 1-xxxx-xxxxx-xx-x --amount 4.22

Then QR code will be printed in the terminal.

API

generatePayload(idOrPhoneNo, { amount })

Returns a string which should be rendered as a QR code.

References

Implementation in other languages

These libraries are written by other developers:

Integrations with other software

These plugins/integrations are written by other developers:

License

The MIT License

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

主要指標

概覽
名稱與所有者dtinth/promptpay-qr
主編程語言JavaScript
編程語言JavaScript (語言數: 3)
平台
許可證MIT License
所有者活动
創建於2017-08-31 20:00:53
推送於2023-01-24 22:43:13
最后一次提交2022-08-20 02:52:17
發布數14
最新版本名稱v0.5.0 (發布於 2022-01-17 14:55:49)
第一版名稱v0.0.2 (發布於 2017-09-01 03:04:09)
用户参与
星數283
關注者數7
派生數92
提交數122
已啟用問題?
問題數11
打開的問題數8
拉請求數6
打開的拉請求數35
關閉的拉請求數18
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?