Generate QRCode for Thai PromptPay
Golang API to generate QRCode
make init
make build
package main
import (
"fmt"
pp "github.com/Frontware/promptpay"
)
func main() {
payment := pp.PromptPay{
PromptPayID: "0105540087061", // Tax-ID/ID Card/E-Wallet
Amount: 100.55, // Positive amount
}
qrcode, _ := payment.Gen() // Generate string to be use in QRCode
fmt.Println(qrcode) // Print string
}
EMV QR Code specification: https://www.emvco.com/wp-content/plugins/pmpro-customizations/oy-getfile.php?u=/wp-content/uploads/documents/EMVCo-Consumer-Presented-QR-Specification-v1.pdf
© 2020 Frontware International. All Rights Reserved.