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\StatementdateDate of the supplied file (format YYYY-MM-DD)accountAccount for which the statements were created. An object implementingCodelicious\BelgianBankStatement\Accountoriginal_balanceBalance of the account before the transactions were processed. Up to 3 decimals.new_balanceBalance of the account after the transactions were processed. Up to 3 decimals.transactionA list of transactions implemented asCodelicious\BelgianBankStatement\Transaction
Codelicious\BelgianBankStatement\AccountnameName of the holder of the accountbicBankcode of the accountnumberBanknumber of the accountcurrencyCurrency of the accountcountryCountry of the account
Codelicious\BelgianBankStatement\TransactionaccountAccount of the other party of the transaction. An object implementingCodelicious\BelgianBankStatement\Accounttransaction_dateDate on which the transaction was requestedvaluta_dateDate on which the transaction was executed by the bankamountAmount of the transaction. Up to 3 decimals. A negative number for credit transactions.messageMessage of the transactionstructured_messageStructured messages of the transaction (if available)
