Socket
Socket
Sign inDemoInstall

github.com/dundee/go-qrcode-payment

Package Overview
Dependencies
3
Alerts
File Explorer

Install Socket

Detect and block malicious and high-risk dependencies

Install

    github.com/dundee/go-qrcode-payment

Package for creating QR codes for payments. Short Payment Descriptor format and EPC QR Code (SEPA) format is supported. - Generating QR code image for Short Payment Descriptor format - Generating QR code image for EPC QR Code QR code image encoding uses https://github.com/skip2/go-qrcode - Getting QR code content for Short Payment Descriptor format


Version published

Readme

Source
QR code for payment

Payment QR code for Go

Build Status codecov Go Report Card Maintainability CodeScene Code Health

Golang library for creating QR codes for payments.

Short Payment Descriptor format and EPC QR Code (SEPA) format is supported.

Installation

go get -u github.com/dundee/qrpay

Usage

Generating QR code image for Short Payment Descriptor format

import "github.com/dundee/qrpay"

p := qrpay.NewSpaydPayment()
p.SetIBAN("CZ5855000000001265098001")
p.SetAmount("10.8")
p.SetDate(time.Date(2021, 12, 24, 0, 0, 0, 0, time.UTC))
p.SetMessage("M")
p.SetRecipientName("go")
p.SetNofificationType('E')
p.SetNotificationValue("daniel@milde.cz")
p.SetExtendedAttribute("vs", "1234567890")

qrpay.SaveQRCodeImageToFile(p, "qr-payment.png")

Generating QR code image for EPC QR Code

import "github.com/dundee/qrpay"

p := qrpay.NewEpcPayment()
p.SetIBAN("CZ5855000000001265098001")
p.SetAmount("10.8")
p.SetMessage("M")
p.SetRecipientName("go")

qrpay.SaveQRCodeImageToFile(p, "qr-payment.png")

QR code image encoding uses skip2/go-qrcode.

Getting QR code content for Short Payment Descriptor format

import "github.com/dundee/qrpay"

p := qrpay.NewSpaydPayment()
p.SetIBAN("CZ5855000000001265098001")
p.SetAmount("108")

fmt.Println(qrpay.GenerateString())
// Output: SPD*1.0*ACC:CZ5855000000001265098001*AM:108*

FAQs

Last updated on 13 Jun 2023

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc