victor-renan / pixgenerator
A static PIX (copy and paste) generator
Installs: 23
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/victor-renan/pixgenerator
Requires (Dev)
- phpunit/phpunit: ^11.5
This package is auto-updated.
Last update: 2025-12-11 15:20:57 UTC
README
A library with no-dependency for generating PIX copy-and-paste codes for static QR Codes. Based on Pix Manual Reference By the BCB (Banco Central do Brasil).
Installation
Latest version via Packagist:
composer require victor-renan/pixgenerator
Usage
Getting Started
<?php // Import the PixGenerator class use VictorRenan\PixGenerator\PixGenerator; // Creates an instance using your Pix key $generator = new PixGenerator('<PixKey>'); // Create the static code $code = $generator->getCode()
Customizing the generated code
// ... // Sets the transaction amount $generator->setTransactionAmount(1.00); // Sets the transaction id $generator->setTransactionId('txId'); // Sets the merchant name $generator->setMerchantName('Jonh Doe'); // Sets the merchant city $generator->setMerchantCity('Brasilia'); // Sets additional info message $generator->setAdditionalInfo('Message');
Testing
Clone this repoitory and install the dev-dependencies via Composer. After this, you can run PHPUnit:
./vendor/bin/phpunit