Skip to content

Frontware/promptpay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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.