定制 pschroee/php-sepa 二次开发

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

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

pschroee/php-sepa

最新稳定版本:v1.3

Composer 安装命令:

composer require pschroee/php-sepa

包简介

PHP class to create German SEPA files (XML) for credit transfer and direct debit.

README 文档

README

PHP class to create German SEPA files (XML) for credit transfer and direct debit.

The versions of the standard followed are:

  • pain.001.001.03_GBIC_3.xsd for credit transfers
  • pain.008.001.02_GBIC_3.xsd for direct debits

Always verify the generated files at your bank before using them in production!

License: BSD 2-Clause License

Example of using SEPA Credit Transfer

$validatorFactory = new \pschroee\PhpSepa\Sepa\Validator\Factory();

$sepa = new \pschroee\PhpSepa\Sepa\CreditTransfer($validatorFactory);
$sepa->setInitiator('Max Mustermann'); // Einreicher
//$sepa->setId($msgId); // Nachrichtenreferenz

$payment = new \pschroee\PhpSepa\Sepa\Payment($validatorFactory);
$payment->setPriority('HIGH'); // Prioritaet NORM oder HIGH
$payment->setAccount('Max Mustermann', 'DE02370501980001802057', 'COLSDE33'); // Auftraggaber
//$payment->setAccountCurrency($currency); // Kontowaehrung
//$payment->disableBatchBooking(); // deaktiviere Sammelbuchung
//$payment->setDate($date); // Faelligkeitsdatum

$transaction = new \pschroee\PhpSepa\Sepa\Transaction($validatorFactory);
$transaction->setEndToEndId('R2017742-1')   // Transaktions-ID (End-to-End)
    ->setName('Karl Kümmel')                // Name des Zahlungspflichtigen
    ->setIban('DE02300209000106531065')     // IBAN des Zahlungspflichtigen
    ->setBic('CMCIDEDD')                    // BIC des Zahlungspflichtigen
    ->setAmount(123.45)                     // abzubuchender Betrag
    ->setPurpose('SALA')                    // (optional) Zahlungstyp
    ->setReference('Rechnung R2017742 vom 17.06.2017'); // Verwendungszweck (eine Zeile, max. 140 Zeichen))
$payment->addTransaction($transaction);

$transaction = new \pschroee\PhpSepa\Sepa\Transaction($validatorFactory);
$transaction->setEndToEndId('R2017742-1')
    ->setName('Doris Dose')
    ->setIban('DE02500105170137075030')
    ->setAmount(234.56)
    ->setPurpose('SALA')
    ->setReference('Kinderfahrrad');
$payment->addTransaction($transaction);

$sepa->addPayment($payment);

$xml = new \pschroee\PhpSepa\Sepa\Xml($sepa);
$xml->download('sepa.xml');

Example of using SEPA Direct Debit

$validatorFactory = new \pschroee\PhpSepa\Sepa\Validator\Factory();

$sepa = new \pschroee\PhpSepa\Sepa\DirectDebit($validatorFactory);
$sepa->setInitiator('Max Mustermann'); // Einreicher
//$sepa->setId($msgId); // Nachrichtenreferenz

$payment = new \pschroee\PhpSepa\Sepa\Payment($validatorFactory);
//$payment->setScope('CORE'); // Lastschriftart (CORE oder B2B)
$payment->setAccount('Max Mustermann', 'DE02370501980001802057', 'COLSDE33'); // Auftraggaber
//$payment->setAccountCurrency($currency); // Kontowaehrung
$payment->setCreditorId('DE98ZZZ09999999999'); // Glaeubigeridentifikationsnummer
//$payment->disableBatchBooking(); // deaktiviere Sammelbuchung
//$payment->setDate($date); // Gewuenschter Ausfuehrungstermin

$transaction = new \pschroee\PhpSepa\Sepa\Transaction($validatorFactory);
$transaction->setEndToEndId('R2017742-1')   // Transaktions-ID (End-to-End)
    ->setName('Karl Kümmel')                // Name des Zahlungspflichtigen
    ->setIban('DE02300209000106531065')     // IBAN des Zahlungspflichtigen
    ->setBic('CMCIDEDD')                    // BIC des Zahlungspflichtigen
    ->setAmount(123.45)                     // abzubuchender Betrag
    ->setPurpose('SALA')                    // (optional) Zahlungstyp
    ->setMandateId('M20170704-200')         // Mandatsreferenz
    ->setMandateDate('2017-07-04')          // Mandatsdatum
    ->setReference('Rechnung R2017742 vom 17.06.2017'); // Verwendungszweck (eine Zeile, max. 140 Zeichen))
$payment->addTransaction($transaction);

$sepa->addPayment($payment);

$xml = new \pschroee\PhpSepa\Sepa\Xml($sepa);
$xml->download('sepa.xml');

External Resources

统计信息

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

GitHub 信息

  • Stars: 2
  • Watchers: 1
  • Forks: 4
  • 开发语言: PHP

其他信息

  • 授权协议: BSD-2-Clause
  • 更新时间: 2024-02-01

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固