Documentation ¶
Index ¶
- Constants
- func QRForBillPayment(billerID string, ref1 string, ref2 string, terminalID string, amount string) (*[]byte, error)
- func QRForTarget(target string) (*[]byte, error)
- func QRForTargetWithAmount(target, amount string) (string, error)
- func QRWithPromptpayLogoForTargetWithAmount(target, amount string) (*[]byte, error)
- type PromptPayQR
- type QRCodeGenerator
Constants ¶
View Source
const ( ID_PAYLOAD_FORMAT = "00" ID_POI_METHOD = "01" ID_MERCHANT_INFORMATION_BOT = "29" ID_MERCHANT_INFORMATION_BOT_BILL_PAYMENT = "30" ID_TRANSACTION_CURRENCY = "53" ID_TRANSACTION_AMOUNT = "54" ID_COUNTRY_CODE = "58" ID_DATA_OBJECTS = "62" ID_CRC = "63" PAYLOAD_FORMAT_EMV_QRCPS_MERCHANT_PRESENTED_MODE = "01" POI_METHOD_STATIC = "11" POI_METHOD_DYNAMIC = "12" MERCHANT_INFORMATION_TEMPLATE_ID_GUID = "00" BOT_ID_MERCHANT_PHONE_NUMBER = "01" BOT_ID_MERCHANT_TAX_ID = "02" BOT_ID_MERCHANT_EWALLET_ID = "03" BOT_ID_TAG30_AID = "00" BOT_ID_TAG30_BILLER_ID = "01" BOT_ID_TAG30_REF1 = "02" BOT_ID_TAG30_REF2 = "03" BOT_ID_TAG62_TERMINAL_ID = "07" GUID_PROMPTPAY = "A000000677010111" GUID_PROMPTPAY_BILL_PAYMENT = "A000000677010112" TRANSACTION_CURRENCY_THB = "764" COUNTRY_CODE_TH = "TH" )
Variables ¶
This section is empty.
Functions ¶
func QRForBillPayment ¶
func QRForTarget ¶
func QRForTargetWithAmount ¶
Types ¶
type PromptPayQR ¶
type PromptPayQR struct { }
func New ¶
func New() *PromptPayQR
func (*PromptPayQR) GenerateBillPaymentPayload ¶
func (*PromptPayQR) GeneratePayload ¶
func (qr *PromptPayQR) GeneratePayload(target string, amount *string) string
type QRCodeGenerator ¶
type QRCodeGenerator struct{}
QRCodeGenerator is a struct that provides methods to generate QR code payloads.
func NewQRCodeGenerator ¶
func NewQRCodeGenerator() *QRCodeGenerator
NewQRCodeGenerator creates a new instance of QRCodeGenerator.
func (*QRCodeGenerator) GenerateBillPaymentPayload ¶
func (q *QRCodeGenerator) GenerateBillPaymentPayload(billerID, ref1, ref2 string, terminalID, amount *string) string
GenerateBillPaymentPayload generates a QR code payload for bill payment.
func (*QRCodeGenerator) GeneratePayload ¶
func (q *QRCodeGenerator) GeneratePayload(target string, amount *string) string
GeneratePayload generates a QR code payload for a target with an optional amount.
Click to show internal directories.
Click to hide internal directories.