drei-d/laravel-sepa-xml
Composer 安装命令:
composer require drei-d/laravel-sepa-xml
包简介
Creates SEPA XML files
README 文档
README
This project was made to create SEPA xml files in Laravel.
Requirements
- Laravel 10 or higher
- PHP 8.2 or higher
- ext-dom & ext-iconv enabled
Installation
This project is available via composer.
To install it, run:
composer install drei-d/laravel-sepa-xml
Configuration
This project comes with a predefined config.
In order to use this package, you need to customize it to your needs.
Publish the configuration by running:
php artisan vendor:publish --provider=DREID\\LaravelSepaXml\\Providers\\ServiceProvider
The configuration file should look like the following:
return [ 'from' => 'FROM EXAMPLE', 'iban' => 'IBAN EXAMPLE', 'bic' => 'BIC EXAMPLE', 'prefix' => 'PREFIX-EXAMPLE-', // group transactions as a single transfer 'batch_booking' => false ];
- Replace
FROM EXAMPLEwith your companies name. You should use caps lock and no special characters. - Replace
IBAN EXAMPLEwith the IBAN of the bank account you want to send money from. Do not include spaces. - Replace
BIC EXAMPLEwith the BIC of the bank account you want to send money from. Do not include spaces. - Replace
PREFIXwith a unique identifier for your project. This prefix is used to generate unique End-to-End-IDs for your transactions. - If you want to group your transactions as a single transfer, you can set
batch_bookingto true. If you are not familiar with batch booking, feel free to check out this post.
An example for our company would be:
return [ 'from' => 'DREID-D DIREKTWERBUNG GMBH CO KG', 'iban' => 'DE02120300000000202051', 'bic' => 'BYLADEM1001', 'prefix' => '3D-INTERN-', // group transactions as a single transfer 'batch_booking' => false ];
Usage
This project uses dependency injection. To get access to its services, you should inject them using the app() function, or, if possible, as function parameter.
Example:
use DREID\LaravelSepaXml\Factories\TransactionFactory; use DREID\LaravelSepaXml\Services\SepaFileCreationService; $factory = app(TransactionFactory::class); $service = app(SepaFileCreationService::class); $transaction = $factory->transform( 'Max Mustermann', // account owner 'Test-Subject for Transaction', // subject 'DE02120300000000202051', // IBAN 'BYLADEM1001', // BIC 49.95 // amount in EUR ); $service->save( 'local', // storage disk 'sepa.xml', // file name '1', // transaction number, should be unique per export [ $transaction ] // array of transactions you want to export );
When using the factory, your values are automatically sanitized. You can see the changes made by dumping the DTO.
dump($transaction);
The result should look like this:
[
'accountOwner' => 'MAX MUSTERMANN',
'subject' => 'TEST-SUBJECT FOR TRANSACTION',
'iban' => 'DE02120300000000202051',
'bic' => 'BYLADEM1001',
'amount' => 49.95
]
drei-d/laravel-sepa-xml 适用场景与选型建议
drei-d/laravel-sepa-xml 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 575 次下载、GitHub Stars 达 0, 最近一次更新时间为 2023 年 12 月 19 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 drei-d/laravel-sepa-xml 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 drei-d/laravel-sepa-xml 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 575
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 12
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: Unknown
- 更新时间: 2023-12-19