IBanking Package for Laravel 5.6
, (*1)
This package allows you to crawl and parse your bank balance and statement. Currently available for Bank BCA and Bank Mandiri., (*2)
Quick Installation
To get started with IBanking, run this command or add the package to your composer.json
, (*3)
composer require "arifr007/ibanking:dev-master"
Configuration
After installing the IBanking package, simply add this classes to the providers
array in your project's config/app.php
file:, (*4)
Arifr007\IBanking\IBankingServiceProvider::class
Also, add the IBanking
facade to the aliases
array in your app
configuration file:, (*5)
'IBanking' => Arifr007\IBanking\Facades\IBanking::class,
Finally add these lines to your config/services.php
file:, (*6)
'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:, (*7)
$ibank = IBanking::bank('bca'); // or use IBanking::bank('mandiri') for mandiri user
$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., (*8)
Non-Laravel Usage
You can stil use IBanking without Laravel. This is how:, (*9)
After running composer require arifr007/ibanking
, create a php file in your project folder and put the following codes, (*10)
require 'vendor/autoload.php';
use Arifr007\IBanking\CrawlerParser;
use Arifr007\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., (*11)
Issues
For bug reporting or code discussions.
More info on how to work with GitHub on help.github.com., (*12)
Contributing
Contributions are welcome and will be fully credited., (*13)
Credits
this project's base from Rick20 iBanking and modified for compatibility to latest laravel 5.6., (*14)
License
The module is licensed under MIT. In short, this license allows you to do everything as long as the copyright statement stays present., (*15)