dtinth/promptpay-qr

PromptPay callback

Closed this issue · 3 comments

Hello, we are now planning to use PromptPay as an online payment method for our e-commerce website. However, if customers pay through PromptPay and we are unable to receive the payment callback from PromptPay to associate the payment with the order, what can we do to solve this situation?

dtinth commented

@jiangsiYang Good question. There are multiple ways to receive money via PromptPay.

  • Static QR code
  • Dynamic QR code

This library only generates a “static QR code.” It is a simple way to allow anyone to generate a QR code that lets user transfer to any PromptPay ID. However, using this method, it is impossible to associate the payment with the order or receive a callback. However, most banking apps will generate a payslip image after a successful transfer. You can ask your customer to upload the slip image afterwards. Usually, the image will contain a QR code. You can then use a “Slip Verification” API to automatically verify them and pay for each slip verified. (I have never used any of them so I cannot recommend any.)

On the other hand, a unique “dynamic QR code” is generated for each transaction. This allows individual transaction to be identified. However, you need to integrate with a service provider to receive a callback, and payment processing fees apply. The easiest way is to use a payment gateway, like Opn Payments. (Disclosure: although I currently work at Opn, this library is a personal project and is completely unrelated to Opn.)

I googled for "Slip Verification API". It seems there is no free/open source solution for this?

thanks