Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

QR image generated displays base64 encoded data not the actual data #6

Closed
AbdelRahman-Elshafai opened this issue Nov 17, 2021 · 4 comments

Comments

@AbdelRahman-Elshafai
Copy link

Hello, the qr image generated displays the base64 encoded data not the actual data?

i have used the code you provided to display it in an image tag

 $displayQRCodeAsBase64 = GenerateQrCode::fromArray([
                new Seller('Salla'), // seller name
                new TaxNumber('1234567891'),
                new InvoiceDate('2021-07-12T14:25:09Z'),
                new InvoiceTotalAmount('100.00'),
                new InvoiceTaxAmount('15.00')
])->render();

<img src="<?php echo $displayQRCodeAsBase64;?>" alt="QR Code" />

this is the qr code generated by the code above you can scan it and see for yourself

https://ibb.co/3cMjybb

am i missing something?

@salkhwlani
Copy link
Member

@AbdelRahman-Elshafai we will check..

@salkhwlani
Copy link
Member

@AbdelRahman-Elshafai The QR is not readable btw, so it's okay some QR readers doesn't recognize the output for the human eyes,

If you want to test the output you can use the Phone QR Reader, or the following website

https://www.onlinebarcodereader.com/

This is a example for the output of your QR Code

eDWbslfj-2021-11-18 at 09 27 09

@AbdelRahman-Elshafai
Copy link
Author

yes that's exactly what i mean the content is the base64 encoded data not the actual data that i submitted.

isn't it supposed to show me the seller name ex: 'Salla' not the base64 encoded data?

@ali-alharthi
Copy link
Contributor

@AbdelRahman-Elshafai It should be encoded in base64.
"It is mandatory to generate and print QR code encoded in Base64 format with up to 500 char-
acters" as stated by ZATCA.
Please read the QRCodeCreation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants