qrpayment

package module
v0.0.0-...-e17b7c0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2025 License: MIT Imports: 9 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

QRPayment SDK

QRPayment SDK is a Go library that supports generating multiple types of payment QR codes, including VietQR, VNPay, VNPay Wallet, and MoMo Wallet.

Installation

go get github.com/tranvu711/qrpayment

Usage

Initialize QRCode
import "github.com/tranvu711/qrpayment"

qr, err := qrpayment.NewQRPayment()
if err != nil {
    panic(err)
}

Generate QR Codes by Type

VietQR Example
qr, _ := qrpayment.NewQRPayment()
qr.SetQRType(qrpayment.QRTypeVietQR)
qr.SetBankBin(qrpayment.BANKS.Vietcombank.BIN)
qr.SetAccountNo("0441000670827")
qr.SetAmount(100000)
qr.SetNote("Payment for order 123")
qr.SetTransactionCurrency(qrpayment.CurrencyVND)
qr.SetCountryCode(qrpayment.CountryVN)

qrText, _ := qr.GenerateText()
fmt.Println("VietQR Code Text:", qrText)
VNPay Example
qr, _ := qrpayment.NewQRPayment()
qr.SetQRType(qrpayment.QRTypeVNPay)
qr.SetMCC("4829")
qr.SetMerchantName("My Shop")
qr.SetMerchantId("123456789", true)
qr.SetTerminalID("T12345")
qr.SetTerminalName("Main Terminal")
qr.SetCityName("Hanoi")
qr.SetPostalCode("100000")
qr.SetAmount(500000)

qrText, _ := qr.GenerateText()
fmt.Println("VNPay QR Code Text:", qrText)
VNPay Wallet Example
qr, _ := qrpayment.NewQRPayment()
qr.SetQRType(qrpayment.QRTypeVNPayWallet)
qr.SetCustomerMobileNumber("0901455890")
qr.SetAmount(200000)
qr.SetCountryCode(qrpayment.CountryVN)

qrText, _ := qr.GenerateText()
fmt.Println("VNPay Wallet QR Code Text:", qrText)
MoMo Wallet Example - By Mobile Number
qr, _ := qrpayment.NewQRPayment()
qr.SetQRType(qrpayment.QRTypeMomo)
qr.SetCustomerMobileNumber("0901455890")
qr.SetAmount(150000)
qr.SetNote("Momo payment")

qrText, _ := qr.GenerateText()
fmt.Println("MoMo Wallet QR Code Text:", qrText)
MoMo Wallet Example - By Bank Account
  • Currently, MoMo's multi-purpose QR codes are using BVBank (Bản Việt Bank) to receive payments.
  • Each MoMo account is assigned a corresponding account number at BVBank. Any funds transferred to this account number will be forwarded to the MoMo wallet.
  • You can find this account number on the details page of the payment QR code within the MoMo app.
qr, _ := qrpayment.NewQRPayment()
qr.SetQRType(qrpayment.QRTypeVietQR)
qr.SetBankBin(qrpayment.BANKS.BVBank.BIN)
qr.SetAccountNo("99MM23307M35010091")
qr.SetAmount(100000)
qr.SetNote("Payment for order 123")
qr.SetTransactionCurrency(qrpayment.CurrencyVND)
qr.SetCountryCode(qrpayment.CountryVN)

qrText, _ := qr.GenerateText()
fmt.Println("VietQR Code Text:", qrText)

Available Methods

  • NewQRPayment(configs ...*QRCode) (*QRCode, error): Initializes a new QRPayment instance.
  • SetQRType(qrType string) error: Sets the QR type.
  • SetBankBin(bankBin string) error: Sets the bank BIN.
  • SetAccountNo(accountNo string) error: Sets the account number.
  • SetAmount(amount int) error: Sets the payment amount.
  • SetNote(note string) error: Sets the transaction note.
  • SetCardNo(cardNo string) error: Sets the card number.
  • SetTransactionCurrency(currency string) error: Sets the transaction currency.
  • SetCountryCode(country string) error: Sets the country code.
  • SetMerchantId(merchantId string, isCompany bool) error: Sets the merchant ID.
  • SetMerchantName(merchantName string) error: Sets the merchant name.
  • SetMCC(mcc string) error: Sets the Merchant Category Code.
  • GenerateText() (string, error): Generates the QR code text.
  • GeneratePNG(filename string) error: Generates a QR code image and saves it to a file.

Required Fields & Validation per QR Type

VietQR
  • Required Fields: BankBin, AccountNo or CardNo, Amount
  • Validation:
    • BankBin and AccountNo are required for account transfers.
    • BankBin and CardNo are required for card transfers.
    • Amount must be greater than 0.
VNPay
  • Required Fields: MCC, MerchantName, MerchantID, TerminalID, TerminalName, CityName, PostalCode
  • Validation:
    • All required fields must be provided and non-empty.
    • Amount must be greater than 0.
VNPay Wallet
  • Required Fields: CustomerMobileNumber
  • Validation:
    • CustomerMobileNumber must be provided.
    • Amount, if provided, must be greater than 0.
MoMo Wallet - By Mobile Number
  • Required Fields: CustomerMobileNumber
  • Validation:
    • CustomerMobileNumber must be provided.
    • Amount, if provided, must be greater than 0.

Support

If you encounter any issues or have questions, please create an issue on the project's GitHub repository.

Donate

If you find this project useful and would like to support its development, consider making a donation:

Your support is greatly appreciated! 😊

Documentation

Index

Constants

View Source
const (
	VietQRService                = "A000000727"
	VNPAYMerchantCompanyService  = "A000000775"
	VNPAYMerchantPersonalService = "970436"
	VNPAYWALLETService           = "908401"
)
View Source
const (
	BillNumber                    = "01"
	CustomerMobileNumber          = "02"
	StoreLabel                    = "03"
	ReferenceLabel                = "05"
	CustomerLabel                 = "06"
	TerminalLabel                 = "07"
	PurposeOfTransaction          = "08"
	AdditionalConsumerDataRequest = "09"
	CountryVN                     = "VN"
	CountryJP                     = "JP"
	CountryKR                     = "KR"
	CountryMY                     = "MY"
	CountryRC                     = "RC"
	CountryRI                     = "RI"
	CountryRP                     = "RP"
	CountrySG                     = "SG"
	CountryTH                     = "TH"
	CurrencyVND                   = "704"
	CurrencyJPY                   = "392"
	CurrencyKRW                   = "410"
	CurrencyMYR                   = "458"
	CurrencyCNY                   = "156"
	CurrencyIDR                   = "360"
	CurrencyPHP                   = "608"
	CurrencySGD                   = "702"
	CurrencyTHB                   = "764"
	CRC16Tag                      = "6304"
	StaticQR                      = "11"
	DynamicQR                     = "12"
	VNPayWalletQR                 = "10"
	TransferToAccount             = "QRIBFTTA"
	TransferToCard                = "QRIBFTTC"
)
View Source
const (
	QRTypeVietQR      = "VIETQR"
	QRTypeVNPay       = "VNPAY"
	QRTypeVNPayWallet = "VNPayWallet"
	QRTypeMomo        = "MOMO"
)
View Source
const (
	FieldQRVersion        = "00"
	FieldQRQRType         = "01"
	FieldQRMCC            = "52"
	FieldQRCurrency       = "53"
	FieldQRCountry        = "58"
	FieldQRMerchantName   = "59"
	FieldQRAmount         = "54"
	FieldQRAdditionalData = "62"
	FieldQRCityName       = "60"
	FieldQRPostalCode     = "61"

	// VietQR
	FieldVietQRIdentity                        = "38"
	FiledVietQRIdentitySubService              = "00"
	FiledVietQRIdentitySubCustomer             = "01"
	FiledVietQRIdentitySubCustomerBankBin      = "00"
	FiledVietQRIdentitySubCustomerBankInfo     = "01"
	FiledVietQRIdentitySubCustomerBankInfoType = "02"

	// VNPAY
	FieldVNPayIdentity              = "26"
	FieldVNPayIdentitySubService    = "00"
	FieldVNPayIdentitySubMerchantId = "01"
)
View Source
const (
	CityMaxLength                 = 15
	PostalCodeMaxLength           = 10
	StoreLabelMaxLength           = 25
	TerminalLabelMaxLength        = 25
	BillNumberMaxLength           = 25
	CustomerMobileNumberMaxLength = 25
)
View Source
const (
	FieldVNPayWalletIdentity = "07"
	FieldVNPayWalletService  = "03"
	FieldVNPayWallerCountry  = "10"
	FieldVNPAYWalletAmount   = "09"
)
View Source
const EmptyString = ""
View Source
const (
	QRFormatVersion = "01"
)

Variables

View Source
var BANKS = BankList{
	VietinBank: Bank{
		BIN:       "970415",
		Name:      "Ngân hàng TMCP Công thương Việt Nam",
		ShortName: "VietinBank",
		Code:      "ICB",
	},
	Vietcombank: Bank{
		BIN:       "970436",
		Name:      "Ngân hàng TMCP Ngoại Thương Việt Nam",
		ShortName: "Vietcombank",
		Code:      "VCB",
	},
	BIDV: Bank{
		BIN:       "970418",
		Name:      "Ngân hàng TMCP Đầu tư và Phát triển Việt Nam",
		ShortName: "BIDV",
		Code:      "BIDV",
	},
	Agribank: Bank{
		BIN:       "970405",
		Name:      "Ngân hàng Nông nghiệp và Phát triển Nông thôn Việt Nam",
		ShortName: "Agribank",
		Code:      "VBA",
	},
	OCB: Bank{
		BIN:       "970448",
		Name:      "Ngân hàng TMCP Phương Đông",
		ShortName: "OCB",
		Code:      "OCB",
	},
	MBBank: Bank{
		BIN:       "970422",
		Name:      "Ngân hàng TMCP Quân đội",
		ShortName: "MBBank",
		Code:      "MB",
	},
	Techcombank: Bank{
		BIN:       "970407",
		Name:      "Ngân hàng TMCP Kỹ thương Việt Nam",
		ShortName: "Techcombank",
		Code:      "TCB",
	},
	ACB: Bank{
		BIN:       "970416",
		Name:      "Ngân hàng TMCP Á Châu",
		ShortName: "ACB",
		Code:      "ACB",
	},
	VPBank: Bank{
		BIN:       "970432",
		Name:      "Ngân hàng TMCP Việt Nam Thịnh Vượng",
		ShortName: "VPBank",
		Code:      "VPB",
	},
	TPBank: Bank{
		BIN:       "970423",
		Name:      "Ngân hàng TMCP Tiên Phong",
		ShortName: "TPBank",
		Code:      "TPB",
		SwiftCode: "",
	},
	Sacombank: Bank{
		BIN:       "970403",
		Name:      "Ngân hàng TMCP Sài Gòn Thương Tín",
		ShortName: "Sacombank",
		Code:      "STB",
	},
	HDBank: Bank{
		BIN:       "970437",
		Name:      "Ngân hàng TMCP Phát triển Thành phố Hồ Chí Minh",
		ShortName: "HDBank",
		Code:      "HDB",
	},
	BVBank: Bank{
		BIN:       "970454",
		Name:      "Ngân hàng TMCP Bản Việt",
		ShortName: "VietCapitalBank - BVBank",
		Code:      "VCCB",
	},
	SCB: Bank{
		BIN:       "970429",
		Name:      "Ngân hàng TMCP Sài Gòn",
		ShortName: "SCB",
		Code:      "SCB",
	},
	VIB: Bank{
		BIN:       "970441",
		Name:      "Ngân hàng TMCP Quốc tế Việt Nam",
		ShortName: "VIB",
		Code:      "VIB",
	},
	SHB: Bank{
		BIN:       "970443",
		Name:      "Ngân hàng TMCP Sài Gòn - Hà Nội",
		ShortName: "SHB",
		Code:      "SHB",
	},
	Eximbank: Bank{
		BIN:       "970431",
		Name:      "Ngân hàng TMCP Xuất Nhập khẩu Việt Nam",
		ShortName: "Eximbank",
		Code:      "EIB",
	},
	MSB: Bank{
		BIN:       "970426",
		Name:      "Ngân hàng TMCP Hàng Hải",
		ShortName: "MSB",
		Code:      "MSB",
	},
	CAKE: Bank{
		BIN:       "546034",
		Name:      "TMCP Việt Nam Thịnh Vượng - Ngân hàng số CAKE by VPBank",
		ShortName: "CAKE",
		Code:      "CAKE",
	},
	Ubank: Bank{
		BIN:       "546035",
		Name:      "TMCP Việt Nam Thịnh Vượng - Ngân hàng số Ubank by VPBank",
		ShortName: "Ubank",
		Code:      "Ubank",
	},
	Timo: Bank{
		BIN:       "963388",
		Name:      "Ngân hàng số Timo by Ban Viet Bank (Timo by Ban Viet Bank)",
		ShortName: "Timo",
		Code:      "TIMO",
	},
	ViettelMoney: Bank{
		BIN:       "971005",
		Name:      "Tổng Công ty Dịch vụ số Viettel - Chi nhánh tập đoàn công nghiệp viễn thông Quân Đội",
		ShortName: "ViettelMoney",
		Code:      "VTLMONEY",
	},
	VNPTMoney: Bank{
		BIN:       "971011",
		Name:      "VNPT Money",
		ShortName: "VNPTMoney",
		Code:      "VNPTMONEY",
	},
	SaigonBank: Bank{
		BIN:       "970400",
		Name:      "Ngân hàng TMCP Sài Gòn Công Thương",
		ShortName: "SaigonBank",
		Code:      "SGICB",
	},
	BacABank: Bank{
		BIN:       "970409",
		Name:      "Ngân hàng TMCP Bắc Á",
		ShortName: "BacABank",
		Code:      "BAB",
	},
	PVcomBank: Bank{
		BIN:       "970412",
		Name:      "Ngân hàng TMCP Đại Chúng Việt Nam",
		ShortName: "PVcomBank",
		Code:      "PVCB",
	},
	Oceanbank: Bank{
		BIN:       "970414",
		Name:      "Ngân hàng Thương mại TNHH MTV Đại Dương",
		ShortName: "Oceanbank",
		Code:      "Oceanbank",
	},
	NCB: Bank{
		BIN:       "970419",
		Name:      "Ngân hàng TMCP Quốc Dân",
		ShortName: "NCB",
		Code:      "NCB",
	},
	ShinhanBank: Bank{
		BIN:       "970424",
		Name:      "Ngân hàng TNHH MTV Shinhan Việt Nam",
		ShortName: "ShinhanBank",
		Code:      "SHBVN",
	},
	ABBANK: Bank{
		BIN:       "970425",
		Name:      "Ngân hàng TMCP An Bình",
		ShortName: "ABBANK",
		Code:      "ABB",
	},
	VietABank: Bank{
		BIN:       "970427",
		Name:      "Ngân hàng TMCP Việt Á",
		ShortName: "VietABank",
		Code:      "VAB",
	},
	NamABank: Bank{
		BIN:       "970428",
		Name:      "Ngân hàng TMCP Nam Á",
		ShortName: "NamABank",
		Code:      "NAB",
	},
	PGBank: Bank{
		BIN:       "970430",
		Name:      "Ngân hàng TMCP Xăng dầu Petrolimex",
		ShortName: "PGBank",
		Code:      "PGB",
	},
	VietBank: Bank{
		BIN:       "970433",
		Name:      "Ngân hàng TMCP Việt Nam Thương Tín",
		ShortName: "VietBank",
		Code:      "VIETBANK",
	},
	BaoVietBank: Bank{
		BIN:       "970438",
		Name:      "Ngân hàng TMCP Bảo Việt",
		ShortName: "BaoVietBank",
		Code:      "BVB",
	},
	SeABank: Bank{
		BIN:       "970440",
		Name:      "Ngân hàng TMCP Đông Nam Á",
		ShortName: "SeABank",
		Code:      "SEAB",
	},
	COOPBANK: Bank{
		BIN:       "970446",
		Name:      "Ngân hàng Hợp tác xã Việt Nam",
		ShortName: "COOPBANK",
		Code:      "COOPBANK",
	},
	LienVietPostBank: Bank{
		BIN:       "970449",
		Name:      "Ngân hàng TMCP Bưu Điện Liên Việt",
		ShortName: "LienVietPostBank",
		Code:      "LPB",
	},
	KienLongBank: Bank{
		BIN:       "970452",
		Name:      "Ngân hàng TMCP Kiên Long",
		ShortName: "KienLongBank",
		Code:      "KLB",
	},
	KBank: Bank{
		BIN:       "668888",
		Name:      "Ngân hàng Đại chúng TNHH Kasikornbank",
		ShortName: "KBank",
		Code:      "KBank",
	},
	KookminHN: Bank{
		BIN:       "970462",
		Name:      "Ngân hàng Kookmin - Chi nhánh Hà Nội",
		ShortName: "KookminHN",
		Code:      "KBHN",
	},
	KEBHanaHCM: Bank{
		BIN:       "970466",
		Name:      "Ngân hàng KEB Hana – Chi nhánh Thành phố Hồ Chí Minh",
		ShortName: "KEBHanaHCM",
		Code:      "KEBHANAHCM",
	},
	KEBHANAHN: Bank{
		BIN:       "970467",
		Name:      "Ngân hàng KEB Hana – Chi nhánh Hà Nội",
		ShortName: "KEBHANAHN",
		Code:      "KEBHANAHN",
	},
	MAFC: Bank{
		BIN:       "977777",
		Name:      "Công ty Tài chính TNHH MTV Mirae Asset (Việt Nam) ",
		ShortName: "MAFC",
		Code:      "MAFC",
	},
	Citibank: Bank{
		BIN:       "533948",
		Name:      "Ngân hàng Citibank, N.A. - Chi nhánh Hà Nội",
		ShortName: "Citibank",
		Code:      "CITIBANK",
	},
	KookminHCM: Bank{
		BIN:       "970463",
		Name:      "Ngân hàng Kookmin - Chi nhánh Thành phố Hồ Chí Minh",
		ShortName: "KookminHCM",
		Code:      "KBHCM",
	},
	VBSP: Bank{
		BIN:       "999888",
		Name:      "Ngân hàng Chính sách Xã hội",
		ShortName: "VBSP",
		Code:      "VBSP",
	},
	Woori: Bank{
		BIN:       "970457",
		Name:      "Ngân hàng TNHH MTV Woori Việt Nam",
		ShortName: "Woori",
		Code:      "WVN",
	},
	VRB: Bank{
		BIN:       "970421",
		Name:      "Ngân hàng Liên doanh Việt - Nga",
		ShortName: "VRB",
		Code:      "VRB",
	},
	UnitedOverseas: Bank{
		BIN:       "970458",
		Name:      "Ngân hàng United Overseas - Chi nhánh TP. Hồ Chí Minh",
		ShortName: "UnitedOverseas",
		Code:      "UOB",
	},
	StandardChartered: Bank{
		BIN:       "970410",
		Name:      "Ngân hàng TNHH MTV Standard Chartered Bank Việt Nam",
		ShortName: "StandardChartered",
		Code:      "SCVN",
	},
	PublicBank: Bank{
		BIN:       "970439",
		Name:      "Ngân hàng TNHH MTV Public Việt Nam",
		ShortName: "PublicBank",
		Code:      "PBVN",
	},
	Nonghyup: Bank{
		BIN:       "801011",
		Name:      "Ngân hàng Nonghyup - Chi nhánh Hà Nội",
		ShortName: "Nonghyup",
		Code:      "NHB HN",
	},
	IndovinaBank: Bank{
		BIN:       "970434",
		Name:      "Ngân hàng TNHH Indovina",
		ShortName: "IndovinaBank",
		Code:      "IVB",
	},
	IBKHCM: Bank{
		BIN:       "970456",
		Name:      "Ngân hàng Công nghiệp Hàn Quốc - Chi nhánh TP. Hồ Chí Minh",
		ShortName: "IBKHCM",
		Code:      "IBK - HCM",
	},
	IBKHN: Bank{
		BIN:       "970455",
		Name:      "Ngân hàng Công nghiệp Hàn Quốc - Chi nhánh Hà Nội",
		ShortName: "IBKHN",
		Code:      "IBK - HN",
	},
	HSBC: Bank{
		BIN:       "458761",
		Name:      "Ngân hàng TNHH MTV HSBC (Việt Nam)",
		ShortName: "HSBC",
		Code:      "HSBC",
	},
	HongLeong: Bank{
		BIN:       "970442",
		Name:      "Ngân hàng TNHH MTV Hong Leong Việt Nam",
		ShortName: "HongLeong",
		Code:      "HLBVN",
	},
	GPBank: Bank{
		BIN:       "970408",
		Name:      "Ngân hàng Thương mại TNHH MTV Dầu Khí Toàn Cầu",
		ShortName: "GPBank",
		Code:      "GPB",
	},
	DongABank: Bank{
		BIN:       "970406",
		Name:      "Ngân hàng TMCP Đông Á",
		ShortName: "DongABank",
		Code:      "DOB",
	},
	DBSBank: Bank{
		BIN:       "796500",
		Name:      "DBS Bank Ltd - Chi nhánh Thành phố Hồ Chí Minh",
		ShortName: "DBSBank",
		Code:      "DBS",
	},
	CIMB: Bank{
		BIN:       "422589",
		Name:      "Ngân hàng TNHH MTV CIMB Việt Nam",
		ShortName: "CIMB",
		Code:      "CIMB",
	},
	CBBank: Bank{
		BIN:       "970444",
		Name:      "Ngân hàng Thương mại TNHH MTV Xây dựng Việt Nam",
		ShortName: "CBBank",
		Code:      "CBB",
	},
}

Functions

This section is empty.

Types

type Bank

type Bank struct {
	BIN       string
	Name      string
	ShortName string
	Code      string
	SwiftCode string
}

type BankList

type BankList struct {
	VietinBank        Bank
	Vietcombank       Bank
	BIDV              Bank
	Agribank          Bank
	OCB               Bank
	MBBank            Bank
	Techcombank       Bank
	ACB               Bank
	VPBank            Bank
	TPBank            Bank
	Sacombank         Bank
	HDBank            Bank
	BVBank            Bank
	SCB               Bank
	VIB               Bank
	SHB               Bank
	Eximbank          Bank
	MSB               Bank
	CAKE              Bank
	Ubank             Bank
	Timo              Bank
	ViettelMoney      Bank
	VNPTMoney         Bank
	SaigonBank        Bank
	BacABank          Bank
	PVcomBank         Bank
	Oceanbank         Bank
	NCB               Bank
	ShinhanBank       Bank
	ABBANK            Bank
	VietABank         Bank
	NamABank          Bank
	PGBank            Bank
	VietBank          Bank
	BaoVietBank       Bank
	SeABank           Bank
	COOPBANK          Bank
	LienVietPostBank  Bank
	KienLongBank      Bank
	KBank             Bank
	KookminHN         Bank
	KEBHanaHCM        Bank
	KEBHANAHN         Bank
	MAFC              Bank
	Citibank          Bank
	KookminHCM        Bank
	VBSP              Bank
	Woori             Bank
	VRB               Bank
	UnitedOverseas    Bank
	StandardChartered Bank
	PublicBank        Bank
	Nonghyup          Bank
	IndovinaBank      Bank
	IBKHCM            Bank
	IBKHN             Bank
	HSBC              Bank
	HongLeong         Bank
	GPBank            Bank
	DongABank         Bank
	DBSBank           Bank
	CIMB              Bank
	CBBank            Bank
}

type QRCode

type QRCode struct {
	AdditionalData      map[string]string
	CountryCode         string
	CityName            string
	PostalCode          string
	TransactionCurrency string
	BankBin             string
	AccountNo           string
	CardNo              string
	Amount              *int
	Content             string
	TransferType        string
	QRType              string

	// VNPay data
	MerchantID       string
	MerchantIdentify string
	MerchantName     string
	TerminalID       string
	TerminalName     string
	MCC              string
}

func NewQRPayment

func NewQRPayment(configs ...*QRCode) (*QRCode, error)

NewQRPayment initializes a new QRCode with default values if not provided.

func (*QRCode) GeneratePNG

func (q *QRCode) GeneratePNG(filename string) error

GeneratePNG generates a PNG image of the QR code and saves it to the specified filename.

func (*QRCode) GenerateText

func (q *QRCode) GenerateText() (string, error)

GenerateText generates the QR code text based on the QRCode data.

func (*QRCode) IsValid

func (q *QRCode) IsValid() error

func (*QRCode) SetAccountNo

func (q *QRCode) SetAccountNo(accountNo string) error

SetAccountNo sets the account number for the QRCode.

func (*QRCode) SetAdditionalConsumerDataRequest

func (q *QRCode) SetAdditionalConsumerDataRequest(value string) error

SetAdditionalConsumerDataRequest sets the additional consumer data request in the additional data of the QRCode.

func (*QRCode) SetAmount

func (q *QRCode) SetAmount(amount int) error

SetAmount sets the amount for the QRCode.

func (*QRCode) SetBankBin

func (q *QRCode) SetBankBin(bankBin string) error

SetBankBin sets the bank BIN for the QRCode.

func (*QRCode) SetBillNumber

func (q *QRCode) SetBillNumber(value string) error

SetBillNumber sets the bill number in the additional data of the QRCode.

func (*QRCode) SetCardNo

func (q *QRCode) SetCardNo(cardNo string) error

SetCardNo sets the card number for the QRCode.

func (*QRCode) SetCityName

func (q *QRCode) SetCityName(city string) error

SetCityName sets the city name for the QRCode.

func (*QRCode) SetCountryCode

func (q *QRCode) SetCountryCode(country string) error

SetCountryCode sets the country code for the QRCode.

func (*QRCode) SetCustomerLabel

func (q *QRCode) SetCustomerLabel(value string) error

SetCustomerLabel sets the customer label in the additional data of the QRCode.

func (*QRCode) SetCustomerMobileNumber

func (q *QRCode) SetCustomerMobileNumber(value string) error

SetCustomerMobileNumber sets the customer's mobile number in the additional data of the QRCode.

func (*QRCode) SetMCC

func (q *QRCode) SetMCC(mcc string) error

func (*QRCode) SetMerchantId

func (q *QRCode) SetMerchantId(merchantId string, isCompany bool) error

func (*QRCode) SetMerchantName

func (q *QRCode) SetMerchantName(merchantName string) error

func (*QRCode) SetNote

func (q *QRCode) SetNote(note string) error

SetNote sets the note for the QRCode.

func (*QRCode) SetPostalCode

func (q *QRCode) SetPostalCode(postalCode string) error

SetPostalCode sets the postal code for the QRCode.

func (*QRCode) SetPurposeOfTransaction

func (q *QRCode) SetPurposeOfTransaction(value string) error

SetPurposeOfTransaction sets the purpose of transaction in the additional data of the QRCode.

func (*QRCode) SetQRType

func (q *QRCode) SetQRType(qrType string) error

SetQRType sets the QR type for the QRCode.

func (*QRCode) SetReferenceLabel

func (q *QRCode) SetReferenceLabel(value string) error

SetReferenceLabel sets the reference label in the additional data of the QRCode.

func (*QRCode) SetStoreLabel

func (q *QRCode) SetStoreLabel(value string) error

SetStoreLabel sets the store label in the additional data of the QRCode.

func (*QRCode) SetTerminalLabel

func (q *QRCode) SetTerminalLabel(value string) error

SetTerminalLabel sets the terminal label in the additional data of the QRCode.

func (*QRCode) SetTransactionCurrency

func (q *QRCode) SetTransactionCurrency(currency string) error

SetTransactionCurrency sets the transaction currency for the QRCode.

func (*QRCode) SetTransferType

func (q *QRCode) SetTransferType(transferType string) error

SetTransferType sets the transfer type for the QRCode.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
⌂ 换网址