public function getQrImage(bool $setPngHeader = false): QrCode
    {
        if (!class_exists("Endroid\QrCode\QrCode")) {
            throw new QrPaymentException("Error: library endroid/qr-code is not loaded.", QrPaymentException::ERR_MISSING_LIBRARY);
        }

        if ($setPngHeader) {
            header("Content-type: image/png");
        }

        return new QrCode($this->getQrString());
    }