Download the PHP package jejik/mt940 without Composer

On this page you can find all versions of the php package jejik/mt940. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package mt940

Jejik/MT940

An MT940 bank statement parser for PHP

Build Status

Installation

You can install Jejik/MT940 using Composer. You can read more about Composer and its main repository at http://packagist.org. First install Composer for your project using the instructions on the Packagist home page, then define your dependency on Jejik/MT940 in your composer.json file.

This library follows the PSR-0 standard. You will need a PSR-0 compliant autoloader to load the Jejik/MT940 classes. Composer provides one for you in your vendor/.composer/autoload.php.

PSR-12 standard is for Code-Syntax.

Usage

Statement structure

The returned statements have the following properties. Not all banks supply all properties (e.g. only few provide a transaction book date separately). Properties that are not supplied will be null.

Supported banks

Currencly there are statement parsers for the following banks:

Adding bank parsers

You can easily add your own parser to the statement reader.

When you add your own parser, the default list of parsers is cleared. You must add them back if you want the reader to support them as well.

You can also add your parser at a specific place in the parser chain. For example, this is how you add your parser before the ING parser.

Custom parsers should extend the Jejik\MT940\Parser\AbstractParser class. Have a look at the parsers already implemented to see how to support your bank. At the very minimum, you should implement the accept() method.

Injecting classes

You can easily extend the build-in objects and inject them into the MT940 reader. This allows for easily integrating MT940 into your application. For example, by storing the statements in your database. You can inject them using the following methods:

You can either specify the classname as a string, or provide a PHP callable that returns an object. Your classes do not have to extend the built-in classes but they must implement the proper interfaces.

The callable for the Statement class is passed an AccountInterface and the statement sequence number as parameters. The callable for the Account class and ContraAccount class are passed the account number as parameter. The other callables are not passed any variables.

If the callable for the Account class or Statement class returns null then that statement will be skipped by the parser.

An example, integrating MT940 with your ORM:

Contributing

If you have written a parser for your bank, I'd be happy to add it to the list of default parsers. Just send me a Pull Request with your parsers. Make sure that you also add a unit test for it that parses a test document. You can redact personal information from the test document (e.g. use '123456789' for the account number, etcetera).

I am also happy to implement a parser for you, if you prefer that. Just open an issue and I will contact you privately. I will need an unredacted MT940 file from your bank. It needs to be unredacted because the MT940 isn't well defined and can be fickle. If you redact it, it is possible that the parser I write will work on the file you supplied but not on the real thing. Of course, I will redact the file for you when I add it to my unit tests.

Do not add unredacted MT940 files in the issue tracker please. Send them to me privately. My e-mail address is listed in the source code files.

License

Jejik\MT940 is licensed under the MIT license. See the LICENSE.txt file for the full details. The test files for the ABN-AMRO, ING, Rabobank and Triodos bank come from the dovadi/mt940 ruby parser. Their license can be found in the LICENSE.fixtures.txt file.

The test file for Sparkasse come from Dominic Richter / Powercloud GmbH. The Parser Commerzbank, Deutsche Bank, German Bank, Landesbank Berlin, NuaPay, Oldenburgische Landesbank, Sparkasse, StarMoney and Unicredit come from Powercloud GmbH.


All versions of mt940 with dependencies

PHP Build Version
Package Version
Requires php Version >=7.4.0||^8.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package jejik/mt940 contains the following files

Loading the files please wait ....