fellwell5/bezahlcode

Design QR Code

sadden3194 opened this issue · 2 comments

Hi !

thank you very much for this project !
It works fine!

I have three questions:

private function getQRCode($data){
   return imagecreatefrompng("https://chart.apis.google.com/chart?cht=qr&chs=350x350&chld=L|0&chl=".urlencode($data));
}

Is this the function to generate the qr code with a "google api"?
If yes, is there a way to generate the qr code WITHOUT google ?

  1. How can I modify the design of the qr code? For example: I would like to remove the "Zahlen mit Code" label.
  2. Why has the qr code no transparent background, If I save it as png file:

Bildschirmfoto 2021-10-23 um 17 13 58

Thanks !!

I exactly found this line in the source code as well - I am not a programmer but I think so too.
Using Google to create the image cleraly is a GDPR-breach and renders this php-Code useless.

Hello!
I have implemented the feature to generate the qr codes locally.

Please have a look at the updated readme.
You will need the newest version of bezahlcode.class.php and phpqrcode.php.

Please view the example.php for examples.

The design frame around the qr code can now be simply removed by setting false in the constructor.
If you want to change the design feel free to adapt the existing design by saving the image, removing the qr code with photoshop and changing the design.
I recommend to not change the size, because you will have to adapt the pixels where the qr code will be inserted.

Save the image as base64 (for example with an online converter like https://www.base64-image.de/) and set the variable $bezahlcode->base64_frame with your data.

It's true that the frame design is not transparent, it has a white background like the qr code for better readability.
Feel free to change the design of your frame.

The red background is not from the Bezahlcode class.