fond-of-oryx / payment-epc-qr-code
Payment EPC-QR-Code Module.
2.0.0
2023-01-24 12:59 UTC
Requires
- php: >=8.0
- fond-of-oryx/prepayment: ^1.0.0 || ^2.0.0
- fond-of-oryx/qr-code-generator: ^1.0.0 || ^2.0.0
- spryker/oms-extension: ^1.0.0
Requires (Dev)
- fond-of-codeception/spryker: ^1.0
- spryker/code-sniffer: ^0.12
README
Description
Generates an valid EPC QR-Code for prepayment orders and provide the qr code data in oms mail template so customer can scan the qr code to fill in transfer data
Installation
composer require fond-of-oryx/payment-epc-qr-code
Register plugin PaymentEpcQrCodeExpanderPlugin in src/Pyz/Zed/Oms/OmsDependencyProvider.php
/**
* @param \Spryker\Zed\Kernel\Container $container
*
* @return \Spryker\Zed\OmsExtension\Dependency\Plugin\OmsOrderMailExpanderPluginInterface[]
*/
protected function getOmsOrderMailExpanderPlugins(Container $container)
{
return [
...
new PaymentEpcQrCodeExpanderPlugin(),
];
}
Usage
Add in 'order_confirmation.html.twig' something like
{% if mail.order.prepaymentEpcQrData is defined and mail.order.prepaymentEpcQrData != null %}
<img width="250" class="epc-qr-code" src="{{ mail.order.prepaymentEpcQrData }}"/>
{% endif %}
Configuration
As default the config params from fond-of-oryx/qr-code-generator would be used. But you can override them with the following constants in you config.
Unique config params from this package
See the overview of EPC QR Code format here - to wikipedia
IBAN, BIC, Payment Receiver has to be set in config.