Merge pull request #8906 from beganovich/qrcode-fixes

Fixes for QR code
This commit is contained in:
David Bomba 2023-10-26 14:59:52 +11:00 committed by GitHub
commit bcbb5a9c5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -61,17 +61,16 @@ trait Inviteable
public function getPaymentQrCode()
{
$renderer = new ImageRenderer(
new RendererStyle(200),
new RendererStyle(150, margin: 0),
new SvgImageBackEnd()
);
$writer = new Writer($renderer);
$qr = $writer->writeString($this->getPaymentLink(), 'utf-8');
return "<div>$qr</div>";
return "<svg class='pqrcode' viewBox='0 0 200 200' width='200' height='200' x='0' y='0' xmlns='http://www.w3.org/2000/svg'>
<rect x='0' y='0' width='100%' height='100%' />{$qr}</svg>";
return htmlentities(
sprintf('<div>%s</div>', $qr)
);
}
public function getUnsubscribeLink()