knusperleicht/eps-bank-transfer 问题修复 & 功能扩展

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

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

knusperleicht/eps-bank-transfer

Composer 安装命令:

composer require knusperleicht/eps-bank-transfer

包简介

PSA e-payment standard (EPS) implementation for PHP

README 文档

README

Tests Latest Stable Version Total Downloads License PHP Version Support

A PHP library for integrating the Austrian EPS bank transfer (PSA, specification v2.6, with preparation for v2.7). It helps you start EPS payments, handle the confirmation (callback/return), and trigger refunds (full or partial). Note on origins: This project was initially based on hakito/php-stuzza-eps-banktransfer. The codebase was rewritten but has the same core functionality. Credit to the original authors for the concept and initial implementation.

Links:

Installation

Install via Composer:

composer require knusperleicht/eps-bank-transfer

What is this library for?

  • Start an EPS payment: Create a payment request and redirect customers to the bank list/bank.
  • Receive confirmation (return/callback): Verify the transaction status and update your order.
  • Refund: Trigger a full or partial refund.

The library wraps the required requests/responses generated from the official XSD schemas and provides PSR-compatible HTTP communication.

Quick start

Check the examples in the samples/ folder:

  • samples/eps_start.php – Start a payment (fetch bank list, initialize payment)
  • samples/eps_confirm.php – Process the confirmation callback
  • samples/eps_refund.php – Trigger a refund

Basic configuration (Test/Live)

The SoCommunicator provides endpoint URLs as constants: TEST_MODE_URL for test environments and LIVE_MODE_URL for production usage. Choose the appropriate URL for your environment.

Example:

use Knusperleicht\EpsBankTransfer\Api\SoCommunicator;
use GuzzleHttp\Client;
use Http\Discovery\Psr17FactoryDiscovery;

$isTestMode = true;
$url = $isTestMode ? SoCommunicator::TEST_MODE_URL : SoCommunicator::LIVE_MODE_URL;

$requestFactory = Psr17FactoryDiscovery::findRequestFactory();
$streamFactory = Psr17FactoryDiscovery::findStreamFactory();
$soCommunicator = new SoCommunicator(
    new Client(['verify' => true]),
    $requestFactory,
    $streamFactory,
    $url
);

Typical flow

  1. Get bank list (optional): Show available banks to the user.
  2. Start payment: Create the start request with amount, currency, order ID, and return URLs.
  3. User is redirected to the bank/e-banking.
  4. Process callback/return: Validate status, amount, order ID; update your order status.
  5. Optional: Perform a refund.

The examples under samples/ demonstrate this end-to-end flow.

Security and limitations

  • XML signatures/certificates: Not supported at the moment. Make sure your confirmation URL is hard to guess (e.g., unique tokens per transaction).
  • TLS/verification: Keep certificate verification enabled (['verify' => true]).
  • Idempotency: Implement idempotent handling for callbacks and refunds.

Generated classes from XSD (background & generation)

Requests/responses are generated from the official XSD schemas. This ensures type safety and compatibility with the EPS standard. If schemas change or you need adjustments, you can regenerate the PHP classes:

vendor/bin/xsd2php convert xsd2php.yaml resources/schemas/*.xsd
  • xsd2php.yaml contains the mapping configuration.
  • Schemas live under resources/schemas.
  • Generated classes are placed under src/Internal/Generated/... namespaces and used by the serializer.

Tests

PHPUnit is configured. Run:

vendor/bin/phpunit

License

Apache-2.0 – see LICENSE.

Credits

knusperleicht/eps-bank-transfer 适用场景与选型建议

knusperleicht/eps-bank-transfer 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 68 次下载、GitHub Stars 达 2, 最近一次更新时间为 2025 年 09 月 01 日, 在 PHP 生态内属于活跃度较高的组件。

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

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

围绕 knusperleicht/eps-bank-transfer 我们能提供哪些服务?
定制开发 / 二次开发

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

BUG 修复 & 性能优化

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

项目外包 & 长期维护

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

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Apache-2.0
  • 更新时间: 2025-09-01