nowo-tech/sepa-payment-bundle
Composer 安装命令:
composer require nowo-tech/sepa-payment-bundle
包简介
Symfony bundle for SEPA payment management: Generate SEPA Credit Transfer (pain.001) and Direct Debit (pain.008) XML files, IBAN/BIC validation, mandate management, ISO 20022 compliance, and banking utilities
关键字:
README 文档
README
⭐ Found this useful? Give it a star on GitHub! It helps us maintain and improve the project.
Symfony bundle for SEPA (Single Euro Payments Area) payment management - Generate SEPA Credit Transfer (pain.001.001.03) and Direct Debit (pain.008.001.02) XML files compliant with ISO 20022 standards. Includes comprehensive IBAN/BIC validation, mandate management, XSD schema validation, and banking utilities for European payments.
Features
- ✅ IBAN Validation: Complete IBAN validation according to ISO 13616 standard
- ✅ IBAN Utilities: Format, normalize, extract country code, check digits, and BBAN
- ✅ CCC to IBAN Conversion: Convert Spanish CCC (Código Cuenta Cliente) to IBAN format
- ✅ BIC Validation: Validate BIC (Business Identifier Code) format
- ✅ Automatic BIC Lookup: Automatically look up BIC codes from IBANs (supports 8 countries)
- ✅ Credit Card Validation: Validate credit card numbers using Luhn algorithm and detect card types (Visa, Mastercard, Amex, Discover, etc.)
- ✅ Identifier Generation: Generate unique identifiers for messages, payments, and transactions
- ✅ SEPA XML Parser: Parse and validate SEPA XML files (Credit Transfer and Direct Debit)
- ✅ XSD Schema Validation: Validate XML files against official SEPA XSD schemas (ISO 20022)
- ✅ SEPA String Sanitization: Validate and sanitize strings according to SEPA character rules
- ✅ SEPA Country Validation: Validate SEPA member countries
- ✅ SEPA Business Rules Validation: Validate SEPA limits and business rules (amounts, dates, currencies, sequence types)
- ✅ Export to Other Formats: Export SEPA payment data to JSON and CSV formats, import from JSON
- ✅ Symfony Events: Event system for extensibility (before/after generation events)
- ✅ Structured Logging: Comprehensive logging for SEPA operations with PSR-3 integration
- ✅ SEPA Mandates: Manage SEPA Direct Debit mandates with full support
- ✅ Credit Transfer: Generate SEPA Credit Transfer XML files (pain.001.001.03 format) using Digitick\Sepa library
- ✅ Direct Debit: Generate SEPA Direct Debit XML files (pain.008.001.02 format) using Digitick\Sepa library
- ✅ Array-based API: Generate both types of payment files from simple array format
- ✅ Object-based API: Generate payment files using typed objects for better type safety
- ✅ Multiple Transactions: Support for batch payments in a single file
- ✅ Full Validation: Automatic validation of IBANs before XML generation
- ✅ Type Safety: Full type hints and strict types throughout
- ✅ Console Commands: CLI tools for IBAN validation, CCC conversion, and credit card validation
Installation
composer require nowo-tech/sepa-payment-bundle
Then, register the bundle in your config/bundles.php:
<?php return [ // ... Nowo\SepaPaymentBundle\NowoSepaPaymentBundle::class => ['all' => true], ];
Usage
For detailed usage examples and API documentation, see docs/USAGE.md.
Quick Examples
Generate SEPA Credit Transfer from array:
use Nowo\SepaPaymentBundle\Generator\CreditTransferGenerator; use Nowo\SepaPaymentBundle\Validator\IbanValidator; use Symfony\Component\Translation\IdentityTranslator; $generator = new CreditTransferGenerator(new IbanValidator(), new IdentityTranslator()); $xml = $generator->generateFromArray([ 'reference' => 'MSG-001', 'initiatingPartyName' => 'My Company', 'paymentInfoId' => 'PMT-001', 'creditorIban' => 'ES9121000418450200051332', 'creditorName' => 'My Company Name', 'requestedExecutionDate' => '2024-01-20', 'transactions' => [ [ 'amount' => 100.50, 'debtorIban' => 'GB82WEST12345698765432', 'debtorName' => 'John Doe', 'endToEndId' => 'E2E-001', ], ], ]);
Generate SEPA Direct Debit from array:
use Nowo\SepaPaymentBundle\Generator\DirectDebitGenerator; use Nowo\SepaPaymentBundle\Validator\IbanValidator; $generator = new DirectDebitGenerator(new IbanValidator()); $xml = $generator->generateFromArray([ 'reference' => 'MSG-001', 'bankAccountOwner' => 'My Company', 'paymentInfoId' => 'PMTINF-1', 'dueDate' => '2024-01-20', 'creditorName' => 'My Company Name', 'creditorIban' => 'ES9121000418450200051332', 'seqType' => 'RCUR', 'creditorId' => 'ES98ZZZ09999999999', 'localInstrumentCode' => 'CORE', 'transactions' => [ [ 'amount' => 100.50, 'debtorIban' => 'GB82WEST12345698765432', 'debtorName' => 'John Doe', 'debtorMandate' => 'MANDATE-001', 'debtorMandateSignDate' => '2024-01-15', 'endToEndId' => 'E2E-001', ], ], ]);
For configuration options and translation overrides (domain NowoSepaPaymentBundle), see docs/CONFIGURATION.md.
See docs/USAGE.md for complete examples including:
- IBAN, BIC, and Credit Card validation
- CCC to IBAN conversion
- Identifier generation
- SEPA XML parsing
- Object-based generation
- Address support
- Dependency injection examples
Console Commands
See docs/COMMANDS.md for detailed documentation of all console commands.
Configuration
See docs/CONFIGURATION.md for configuration options.
The bundle works out of the box with default settings. No configuration file is required - the bundle uses sensible defaults.
Requirements
- PHP >= 8.1, < 8.6
- Symfony >= 6.0 || >= 7.0 || >= 8.0
- digitick/sepa-xml ^3.0 (automatically installed as a dependency)
Demo Projects
Demos for Symfony 6, 7 and 8 run with FrankenPHP (development uses Caddyfile.dev without workers; production-style uses worker mode — see docs/DEMO-FRANKENPHP.md). See docs/DEMOS.md for endpoints and quick start.
Development
See docs/DEVELOPMENT.md for development setup, testing, code quality, and CI/CD information.
Tests and coverage
- Tests: PHPUnit (PHP)
- PHP: 100%
License
The MIT License (MIT). Please see LICENSE for more information.
Author
Created by Héctor Franco Aceituno at Nowo.tech
Documentation
- Installation
- Configuration
- Usage
- Contributing
- Changelog
- Upgrading
- Release
- Security
- Engram
- Spec-driven development
- GitHub Spec Kit
Additional documentation
nowo-tech/sepa-payment-bundle 适用场景与选型建议
nowo-tech/sepa-payment-bundle 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 2.29k 次下载、GitHub Stars 达 1, 最近一次更新时间为 2025 年 12 月 16 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「symfony」 「payment」 「sepa」 「Banking」 「IBAN」 「BIC」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 nowo-tech/sepa-payment-bundle 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 nowo-tech/sepa-payment-bundle 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 nowo-tech/sepa-payment-bundle 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
Creates an XML file for a Single Euro Payments Area (SEPA) Credit Transfer.
Simple classes for creating SEPA transfer and direct debit xml files. No dependencies
This package parses and validates International Bank Account Number (IBAN).
The bundle for easy using json-rpc api on your project
Creates an XML file for a Single Euro Payments Area (SEPA) Credit Transfer.
Multishipping support for the Mollie Payment Module for Magento 2
统计信息
- 总下载量: 2.29k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 48
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-12-16