iurydias / pix-static-qr-code-generator

A Golang PIX static QR code generator

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PIX Static QR Code Generator

A PIX static QR Code generator to help in golang services development

Usage

Instancing a new generator

    // passing the pix key
    generator := pix_static_qr_code_generator.New("iury@email.com")

Setting data to PIX Qr Code

Methods available

.SetAmount()

It sets an amount to the payment

Example

    generator.SetAmount(15.00)

.SetDescription()

It sets a description to the payment

Example

    generator.SetDescription("a new payment")

.SetId()

It sets an identification to the payment

Example

    generator.SetId("123")

.SetMerchantName()

It sets a merchant name to the payment

Example

    generator.SetMerchantName("Iury")

.SetMerchantCity()

It sets a merchant city to the payment

Example

    generator.SetMerchantCity("Salvador")

Generating QR Code

Example

    // passing the path where the qr code image will be saved and your file name
   generator.Generate("./qr.png")

About

A Golang PIX static QR code generator


Languages

Language:Go 92.5%Language:Makefile 7.5%