From 279320f270e676bfe48df883175eab52234a176b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eduardo=20Gusm=C3=A3o?= Date: Wed, 17 Jan 2024 22:10:10 +0000 Subject: [PATCH] qr code classe que gera --- src/Boleto/AbstractBoleto.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/Boleto/AbstractBoleto.php b/src/Boleto/AbstractBoleto.php index 35d98985..d9fd0934 100644 --- a/src/Boleto/AbstractBoleto.php +++ b/src/Boleto/AbstractBoleto.php @@ -1887,8 +1887,15 @@ public function getPixQrCodeBase64() } $options = new QROptions; - $options->outputType = QROutputInterface::GDIMAGE_PNG; - $options->addQuietzone = true; + + if (version_compare(PHP_VERSION, '7.4.0') >= 0) { + $options->outputType = QROutputInterface::GDIMAGE_PNG; + $options->addQuietzone = true; + } else { + $options->outputType = QRCode::OUTPUT_IMAGE_PNG; + $options->eccLevel = QRCode::ECC_L; + } + $options->scale = 20; $options->quietzoneSize = 1; $options->drawLightModules = false;