Coernel82 / SEPA-QR-for-Woocommerce

Plug-and-Play Plugin for Woocommerce
GNU General Public License v2.0
4 stars 9 forks source link

Remove Whitespace from IBAN #22

Open Florian1990 opened 1 year ago

Florian1990 commented 1 year ago

IBANs are often grouped via space characters for better readability. For use in the QR code they have to be removed (if present) in order to be standard compliant and work with all banking apps.

Something like the following could work for this (untested):

function muxp_create_qrcode ($amount,$orderid, $muxp_PURPOSE_PREFIX) {

(…)

  $iban = preg_replace('/\s+/', '', $iban);  

  require_once(dirname(__FILE__) . "/vendor/bezahlcode/bezahlcode.class.php");

  $bezahlcode = new Bezahlcode($iban, $bic, $company, "phpqrcode", false);

(…)
Coernel82 commented 12 months ago

Can you make a pull request?

Florian1990 commented 10 months ago

I opened pull request https://github.com/Coernel82/SEPA-QR-for-Woocommerce/pull/24 . I am still waiting for @reichemn to confirm this change does fix the issue. Feel free to merge.