定制 fond-of-oryx/payment-epc-qr-code 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

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

最新稳定版本:2.0.0

Composer 安装命令:

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

包简介

Payment EPC-QR-Code Module.

README 文档

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.

Const Default Note
EPC_QR_CODE_QR_CODE_FORMAT png format (png, svg, binary, eps, pdf, debug)
EPC_QR_CODE_QR_CODE_ENCODING_OVERRIDE UTF-8 encoding
EPC_QR_CODE_QR_CODE_ERROR_CORRECTION_LEVEL_OVERRIDE 1 low 0, medium 1, high 2, quartile 3
EPC_QR_CODE_QR_CODE_SIZE_OVERRIDE 250 size in pixel
EPC_QR_CODE_QR_CODE_MARGIN_OVERRIDE 5 space from border
EPC_QR_CODE_QR_CODE_FOREGROUND_COLOR_OVERRIDE [0, 0, 0] [red, green, blue] black
EPC_QR_CODE_QR_CODE_ROUNDED_BLOCK_SIZE_MODE_OVERRIDE 1 none 0, margin 1, enlarge 2, shrink 3
EPC_QR_CODE_QR_CODE_BACKGROUND_COLOR_OVERRIDE [255, 255, 255] [red, green, blue] white

Unique config params from this package

See the overview of EPC QR Code format here - to wikipedia

Line Example CONST Note
1 BCD EPC_QR_CODE_DATA_SERVICE_TAG normally fixed!
2 002 EPC_QR_CODE_DATA_VERSION 001 or 002
3 2 EPC_QR_CODE_DATA_ENCODING 1=UTF-8, 2=ISO 8859-1, 3=ISO 8859-2, 4=ISO 8859-4, 5=ISO 8859-5, 6=ISO 8859-7, 7=ISO 8859-10, 8=ISO 8859-15
4 SCT EPC_QR_CODE_DATA_TYPE SEPA Credit Transfer
5 BIC variable value come from transfer
6 Payment Receiver variable value come from transfer
7 IBAN variable value come from transfer
8 ISO_CURRENCY_AND_VALUE variable value come from transfer
9 CHAR EPC_QR_CODE_DATA_PURPOSE 4 chars, optional
10 4_CHAR_REF_CODE variable value come from transfer
11 USAGE variable value come from transfer
12 NOTE max. 70 chars, optional

IBAN, BIC, Payment Receiver has to be set in config.

统计信息

  • 总下载量: 16.72k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-06-22