Make QR code generation work without GD extension
blockonomics opened this issue · 2 comments
blockonomics commented
PHP Fatal error: Uncaught Error: Call to undefined function ImageCreate() in /home/enigma/blockonomics-bitcoin-payments/php/phpqrcode.php:999
https://stackoverflow.com/questions/3106991/fatal-error-call-to-undefined-function-imagecreate
We don't expect merchant to have GD extension as this is not a requirement for wordpress
anktd commented
I am on it.
anktd commented
There can be 2 possible solution here:
- We can replace the current
php/phpqrcode.php
library with this php svg qr generator and pass the qrcode_svg_element to the template. - We can simply use open api for QR code generation. This is a google api for qr codes but it is deprecated. There are other qr code api like this one or this one.
Going with the first here as it seems more reliable.