定制 cyberwizzard/mt940 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

cyberwizzard/mt940

Composer 安装命令:

composer require cyberwizzard/mt940

包简介

Addon for the MT940 bank statement parser to add Rabobank CSV and updated ING MT940 support using PHP 5.3

README 文档

README

An composer extension to the MT940 parser from the jejik/mt940 library that fixes parsing ING Bank statements in the MT940 format and adds support for Rabobank CSV statements

Installation

You can install cyberwizzard/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 cyberwizzard/MT940 in your composer.json file.

Note: currently this library is not published on Packagist; as soon as it is cleaned up, it will get published and there will be no need to specify a repository.

    {
        "repositories": [{
            "type": "vcs",
            "url": "https://github.com/cyberwizzard/mt940"
        }],
        "require": {
            "cyberwizzard/mt940": ">=0.3"
        }
    }

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

Usage

<?php

use Jejik\MT940\Reader;

$reader = new Reader();

// Load the Rabobank CSV parser
$reader->addParser( 'RabobankCSV', 'cyberwizzard\MT940\Parser\RabobankCSV' );
// Append the list of default bank parsers (optional)
$reader->addParsers( $reader->getDefaultParsers() );
// Load the Ing parser from this repository to replace the one from jejik/MT940
$reader->addParser( 'Ing', 'cyberwizzard\MT940\Parser\Ing' );

$statements = $reader->getStatements(file_get_contents('mt940.txt'));

foreach ($statements as $statement) {
    echo $statement->getOpeningBalance()->getAmount() . "\n";

    foreach ($statement->getTransactions() as $transaction) {
        echo $transaction->getAmount() . "\n";
    }

    echo $statement->getClosingBalance()->getAmount() . "\n";
}

For more information, see the jejik/MT940 repository.

Disclaimer

Use this parser at your own risk. While the utmost care is taken to design parsers which are fully compliant with the official bank statement formats, most of the implementations from the banks themselves seem to have quirks.

This parser is in use in a private project and as such is tested regularly.

统计信息

  • 总下载量: 31
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 3
  • 点击次数: 0
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 3
  • Watchers: 2
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: GNU
  • 更新时间: 2016-11-13

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固