PHP code example of drei-d / laravel-sepa-xml

1. Go to this page and download the library: Download drei-d/laravel-sepa-xml 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/ */

    

drei-d / laravel-sepa-xml example snippets


return [
    'from'   => 'FROM EXAMPLE',
    'iban'   => 'IBAN EXAMPLE',
    'bic'    => 'BIC EXAMPLE',
    'prefix' => 'PREFIX-EXAMPLE-',

    // group transactions as a single transfer
    'batch_booking' => false
];

return [
    'from'   => 'DREID-D DIREKTWERBUNG GMBH CO KG',
    'iban'   => 'DE02120300000000202051',
    'bic'    => 'BYLADEM1001',
    'prefix' => '3D-INTERN-',

    // group transactions as a single transfer
    'batch_booking' => false
];

use DREID\LaravelSepaXml\Facades\Sepa;

$creator = Sepa::create('T1-2026-')
    ->addTransaction(
        subject: 'Test-Subject for Transaction',
        amount: 49.95, // amount in EUR
        accountOwner: 'Max Mustermann',
        iban: 'DE02120300000000202051', // IBAN
        bic: 'BYLADEM1001', // BIC
    )
    ->save('text.xml');

use DREID\LaravelSepaXml\Facades\Sepa;

$creator = Sepa::create('T1-2026-')
    ->addTransaction(
        // ..
    )
    ->getContent();

use DREID\LaravelSepaXml\Facades\Sepa;

$creator = Sepa::create('T1-2026-')
    ->sanitized()
    ->addTransaction(
        // ..
    )
    ->getContent();

use DREID\LaravelSepaXml\Facades\Sepa;

$creator = Sepa::create('T1-2026-')
    ->minified()
    ->addTransaction(
        // ..
    )
    ->getContent();

use DREID\LaravelSepaXml\Facades\Sepa;
use DREID\LaravelSepaXml\DataTransferObjects\ConfigurationDto;

$creator = Sepa::create(
    transactionNumber: 'T1-2026-',
    configurationDto: new ConfigurationDto(
        from: 'MAX MUSTERMANN',
        iban: 'DE02120300000000202051',
        bic: 'BYLADEM1001',
        prefix: 'TEST-',
        batchBooking: true,
    )
);
shell
php artisan vendor:publish --provider=DREID\\LaravelSepaXml\\Providers\\ServiceProvider