Download the PHP package drei-d/laravel-sepa-xml without Composer
On this page you can find all versions of the php package drei-d/laravel-sepa-xml. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-sepa-xml
Laravel Sepa XML
This project was made to create SEPA xml files in Laravel.
Dependencies
These dependencies are required:
- Laravel 10 or higher
- PHP 8.4 or higher
... and for some features, these are needed:
- ext-dom
- ext-iconv
Installation
This project is available via composer.
To install it, run:
Configuration
This project comes with a predefined config.
In order to use this package, you need to customize it to your needs.
Publish the configuration by running:
The configuration file should look like the following:
- Replace
FROM EXAMPLEwith your companies name. You should use caps lock and no special characters. - Replace
IBAN EXAMPLEwith the IBAN of the bank account you want to send money from. Do not include spaces. - Replace
BIC EXAMPLEwith the BIC of the bank account you want to send money from. Do not include spaces. - Replace
PREFIXwith a unique identifier for your project. This prefix is used to generate unique End-to-End-IDs for your transactions. - If you want to group your transactions as a single transfer, you can set
batch_bookingto true. If you are not familiar with batch booking, feel free to check out this post.
An example for our company would be:
Usage
Saving to a file
You can create a new SEPA file using the provided Sepa facade, like this:
Getting the XML content as a string
Instead of saving to a file, you can also get the generated XML content like this:
Sanitizing the inputs
If you are not sure, whether your data contains (mostly forbidden) special characters or not, you can turn on the built-in sanitizer like this:
Minifying the output
By default, the output gets formatted. You can also minify the XML instead:
Using a different configuration per created file
If you need to create transactions from multiple accounts, you can pass a configuration class to the Sepa facade as well: