schrammel-codes / magento2-epc-qr-code
This modules enables merchants to provide an EPC QR code for banktransfer payments to customers
Installs: 368
Dependents: 0
Suggesters: 0
Security: 0
Stars: 6
Watchers: 1
Forks: 2
Open Issues: 0
Type:magento2-module
Requires
- php: ^8.1
- apirone/php-qr-code: ^1
- magento/framework: ^103
- smhg/sepa-qr-data: ^2
README
Enables merchants to provide an EPC QR code for banktransfer payments to customers.
Table of contents
- đ Summary
- âšī¸ Background
- đ¨đŧâđ§ Installation
- đ ī¸ Configuration
- đī¸ Usage
- â Contribution
- âī¸ License
đ Summary
To ease payments for customers, merchants can provide an EPC QR code for banktransfer payments.
This module adds new configurations to the Banktransfer
payment method, which generates an EPC QR code for the
customer to scan with their banking app.
âšī¸ Background
EPC QR codes (PDF)
are a standardized way to provide payment information to customers. The generated QR code contains all the information
needed to make a banktransfer payment, such as the beneficiary, IBAN, the transaction amount and the reference.
The customers simply can scan the QR code with their banking app to initiate the payment.
đ¨đŧâđ§ Installation
composer require schrammel-codes/magento2-epc-qr-code
bin/magento module:enable SchrammelCodes_EpcQrCode
bin/magento setup:upgrade
đ ī¸ Configration
This module adds additional configurations to the Banktransfer
payment method in
Stores > Configuration > Sales > Payment Methods > Bank Transfer Payment
.
When using colors for your QR code, make sure it is easy to scan. Some color combinations might make it hard to impossible for the banking apps to process the QR code.
đī¸ Usage
As soon as the module is enabled and configured with correct information, the QR code will be rendered below the banktransfer payment instructions in every place they are rendered.
Please observe, that the above shown QR code is an example and does not contain a valid IBAN which results in an error scanning this code with a banking app. With correct configuration, the QR code will work as intended.
Further, the module offers a view model \SchrammelCodes\EpcQrCode\ViewModel\QrCode
with following methods that can be
used to render the QR code image tag in the frontend:
renderQrCodeImageTagFromOrderIncrementId(string $orderIncrementId): ?string
renderQrCodeImageTagFromOrder(\Magento\Sales\Api\Data\OrderInterface $order): ?string
If the prerequisites to render the QR code are not met, the methods will return null
.
â Contribution
Contributions are welcome! If you have any suggestions, feature requests or issues, please create a new issue or submit a pull request.
âī¸ License
MIT Copyright (c) 2024 Dipl.-Ing. Andreas Schrammel, BSc.