tigron / sepa-payments
用于创建SEPA 001.001.03付款文件的软件包
0.0.5
2016-12-05 13:12 UTC
Requires
README
概述
此库将创建一个SEPA pain.001.001.03信用转账XML文件。XML文件通过ING格式验证工具进行验证:url: https://ing-fvt.liaison.com/welcome.do 登录:ING10 密码:Format10
待办事项
- 输入验证
- 更好的报告
- XML格式化(tidy?)
- 与XSD验证
示例
$organization = new \Tigron\Sepa\Organization();
$organization->name = 'Tigron';
/**
* Set the identification
*
* Possible types: bic, bei or kbo-bce
*/
$organization->set_identification('kbo-bce', '0888764123');
$credit = new \Tigron\Sepa\File\Credit();
$credit->messageIdentification = 1;
$credit->initiatingParty = $organization;
$debtor = new \Tigron\Sepa\Debtor();
$debtor->name = 'Tigron';
$debtor->country = 'BE';
$debtor->zipcode = '1930';
$debtor->city = 'Zaventem';
$debtor->street = 'Excelsiorlaan';
$debtor->housenumber = '17';
// Create a payment
$payment = new \Tigron\Sepa\Payment();
$payment->paymentInformationIdentification = 'payment_1';
$payment->requestedExecutionDate = new DateTime('2016-09-15');
$payment->debtorAccount = 'BE12123412341234';
$payment->debtorAgent = 'BICAZE';
$payment->debtor = $debtor;
$creditor = new \Tigron\Sepa\Creditor();
$creditor->name = 'My Supplier';
$creditor->country = 'BE';
$creditor->zipcode = '1930';
$creditor->city = 'Zaventem';
$creditor->street = 'Excelsiorlaan';
$creditor->housenumber = '17';
// Create a transaction
$transaction = new \Tigron\Sepa\Transaction();
$transaction->paymentIdentification = 'payment_1';
$transaction->amount = 500;
$transaction->creditorAgent = 'BICEZA';
$transaction->creditorAccount = 'BE12123412341234';
$transaction->creditor = $creditor;
$transaction->structured_message = '123123412345';
$payment->transactions[] = $transaction;
$transaction = new \Tigron\Sepa\Transaction();
$transaction->paymentIdentification = 'payment_1';
$transaction->amount = 500;
$transaction->creditorAgent = 'BICEZA';
$transaction->creditorAccount = 'BE12123412341234';
$transaction->creditor = $creditor;
$transaction->unstructured_message = 'Invoice 123';
$payment->transactions[] = $transaction;
$credit->payments = [ $payment ];
$xml = $credit->render();