fond-of-oryx/payment-epc-qr-code

Payment EPC-QR-Code Module.

2.0.0 2023-01-24 12:59 UTC

This package is auto-updated.

Last update: 2024-10-27 13:02:59 UTC


README

license

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.