Skip to content

Latest commit

 

History

History
57 lines (34 loc) · 1.17 KB

File metadata and controls

57 lines (34 loc) · 1.17 KB

Frontware

PromptPay

Generate QRCode for Thai PromptPay

logo

Golang API to generate QRCode

Build on your computer

Install dependencies

make init

Build

make build

Example

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
}

Try it on Go playground

Documentation

API

PkgGoDev

Specifications

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.