Unified parser for several bank statement formats from Belgian banks. Supports CODA, MT940 and CSV (BNP Paribas)
You can install Codelicious/BelgianBankStatement 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 Codelicious/BelgianBankStatement in your composer.json
file.
{
"require": {
"codelicious/php-belgianbankstatement-parser": "dev-master"
}
}
<?php
use Codelicious\BelgianBankStatement\Parsers;
$parser = new Parser();
$statement = $parser->parseFile('coda-file.cod', 'coda');
echo $statement->date . "\n";
foreach ($statement->transactions as $transaction) {
echo $transaction->account->name . ": " . $transaction->amount . "\n";
}
echo $statement->new_balance . "\n";
Codelicious\BelgianBankStatement\Statement
date
Date of the supplied file (format YYYY-MM-DD)account
Account for which the statements were created. An object implementingCodelicious\BelgianBankStatement\Account
original_balance
Balance of the account before the transactions were processed. Up to 3 decimals.new_balance
Balance of the account after the transactions were processed. Up to 3 decimals.transaction
A list of transactions implemented asCodelicious\BelgianBankStatement\Transaction
Codelicious\BelgianBankStatement\Account
name
Name of the holder of the accountbic
Bankcode of the accountnumber
Banknumber of the accountcurrency
Currency of the accountcountry
Country of the account
Codelicious\BelgianBankStatement\Transaction
account
Account of the other party of the transaction. An object implementingCodelicious\BelgianBankStatement\Account
transaction_date
Date on which the transaction was requestedvaluta_date
Date on which the transaction was executed by the bankamount
Amount of the transaction. Up to 3 decimals. A negative number for credit transactions.message
Message of the transactionstructured_message
Structured messages of the transaction (if available)