Giter Club home page Giter Club logo

ibanking's Introduction

IBanking Package for Laravel 5

This package allows you to crawl and parse your bank balance and statement. Currently available for Bank BCA and Bank Mandiri. Inspired by the original BCA Parser. Thank you yah gan =)

Installation

To get started with IBanking, run this command or add the package to your composer.json

composer require rick20/ibanking

Configuration

After installing the IBanking package, register the Rick20\IBanking\IBankingServiceProvider in your config/app.php file. Also, add the IBanking facade to the aliases array in your app configuration file:

'IBanking' => Rick20\IBanking\Facades\IBanking::class,

Finally add these lines to your config/services.php file:

'bca' => [
    'username' => 'your-klikbca-username',
    'password' => 'your-klikbca-password'
],
'mandiri' => [
    'username' => 'your-mandiri-username',
    'password' => 'your-mandiri-password'
]

How To Use

After all sets, use the IBanking as follows:

$ibank = IBanking::bank('bca');

$ibank->login();

$balance = $ibank->getBalance();

$statement = $ibank->getStatement(3); // mutation within last 3 days. Default: 1 (yesterday)

$ibank->logout();

The logout() method should be called to avoid single session at a time restriction from the internet banking provider. This means if you don't call the logout() method at the end of your codes, you won't be able to login to your internet banking from anywhere until its session expired.

Non-Laravel Usage

You can stil use IBanking without Laravel. This is how:

After running composer require rick20/ibanking, create a php file in your project folder and put the following codes

require 'vendor/autoload.php';

use Rick20\IBanking\CrawlerParser;
use Rick20\IBanking\Providers\BCAProvider;

$ibank = new BCAProvider(new CrawlerParser(), 'username', 'password');
$ibank->login();
$balance = $ibank->getBalance();
$statement = $ibank->getStatement();
$ibank->logout();

// the rest of your code...

Tips & Advice

You can place the above code under the Scheduled Command job (Laravel) and sets it to run not more than 100x per day. The less you run it per day, the less chances you are being suspended by the internet banking provider. Please make any necessary effort to keep your ibank username and password safe and secure. Changing your password regularly can help to keep it more secure.

Bugs & Improvements

Feel free to report me any bug you found. I would be also very happy to receive pull requests for improvements and for other internet banking provider as well.

ibanking's People

Contributors

rick20 avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.