abcaeffchen/sepa-documentor 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

abcaeffchen/sepa-documentor

Composer 安装命令:

composer require abcaeffchen/sepa-documentor

包简介

Generates file routing slips and control lists from SEPA file data

README 文档

README

Unit Tests Latest Stable Version Total Downloads License

General

SepaDocumentor is a module for Sephpa to create file routing slips and control lists as PDF file(s) while generating SEPA xml files.

Requirements

SepaDocumentor works with PHP >=8.1 and requires mPDF >=8.0. It is an optional module of Sephpa >= 2.0, but you can also use it with other SEPA projects as well.

Installation

Composer

Just add

{
    "require": {
        "abcaeffchen/sepa-documentor": "~2.0"
    }
}

to your composer.json and include the Composer autoloader to your script. If you want to use SepaDocumentor with Sephpa, you also need to add the line "abcaeffchen/sephpa": "~2.0.0"

Direct download

You can download it here on GitHub. You need to make it available in all files, where Sephpa is used. You also have to download mPDF and make it available to SepaDocumentor. It integrates with Sephpa, so you don't have to do anything else.

What do the PDF files contain?

There are two files that can be generated: File Routing Slip and Control Lists.

File Routing Slip

The File Routing Slip contains a summary of the SEPA file. This contains the username of the creator and ID of the file, the number of transactions and the sum of the transferred money and some more information.

Control List

This contains a detailed list of all transactions that are contained in the SEPA file.

Personalize the PDF files

You can modify the templates in src/templates to change the look of the PDF files. This files also contain the localizations. There are a german and english template included but there is a good chance that the english version is a very bad translations, since I have no clue about finance speak. So I would be happy if someone will check this and send me a correct version :)

How to use

With Sephpa

Just use Sephpa as usual. When you call download or store, set the addDocumentation flag. If you want to download a file, you have to download a zip file that contains the xml file(s) and the documentation files as PDF files.

With other SEPA libraries

Overview

There are four functions you can use:

  • FileRoutingSlip::createText($template, $data): Inserts the $data array into the template. $template can be a path to a template or the name of a default template, and it can have any format.
  • FileRoutingSlip::createPDF($template, $data): The same as createText(), but the template needs to be in HTML format.
  • ControlList::createText($template, $data, $transactions): Inserts the $data array into the template and repeats the transaction block as often as needed, each filled with the values from one of the arrays in $transactions $template can be a path to a template or the name of a default template, and it can have any format.
  • ControlList::createPDF($template, $data, $transactions): The same as createText(), but the template needs to be in HTML format.

Templates

Templates can have any format. You can use

  • placeholders of the form {{KEYWORD}}, where KEYWORD is a string mating [a-zA-Z0-9_-]+.
  • conditionals
  • {{ifdef KEYWORD}} BODY {{endif KEYWORD}}: BODY is only printed if KEYWORD is set. BODY can contain placeholders and other conditionals as long as the nested conditionals use other keywords.
  • {{ifndef KEYWORD}} BODY {{endif KEYWORD}}: BODY is only printed if KEYWORD is not set. BODY can also contain placeholders and other conditionals as long as the nested conditionals use other keywords.
  • {{TRANSACTION!}} BLOCK {{/TRANSACTION!}}: This is a spacial command block only allowed for control lists. BLOCK can contain any other placeholders or conditionals. This block will be repeated and interpreted for each transaction. Every unused placeholder will be removed from the output.

Inputs

  • $data is a key => value array, where keys are the placeholders without the braces.
  • $transactions is an array of key => value arrays, one for each transaction.

Not every placeholder needs to be present in the input. Keys without a corresponding placeholder will be ignored.

License

Licensed under the LGPL v3.0 License.

abcaeffchen/sepa-documentor 适用场景与选型建议

abcaeffchen/sepa-documentor 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 262.88k 次下载、GitHub Stars 达 2, 最近一次更新时间为 2017 年 10 月 22 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「xml」 「files」 「sepa」 「Banking」 「finance」 「control list」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 abcaeffchen/sepa-documentor 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 abcaeffchen/sepa-documentor 我们能提供哪些服务?
定制开发 / 二次开发

基于 abcaeffchen/sepa-documentor 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

  • Stars: 2
  • Watchers: 3
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: LGPL-3.0-only
  • 更新时间: 2017-10-22