PHP code example of nowo-tech / sepa-payment-bundle
1. Go to this page and download the library: Download nowo-tech/sepa-payment-bundle library . Choose the download type require .
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
nowo-tech / sepa-payment-bundle example snippets
return [
// ...
Nowo\SepaPaymentBundle\NowoSepaPaymentBundle::class => ['all' => true],
];
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',
],
],
]);
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',
],
],
]);