All Projects → feelinc → Laravel Bank Statements

feelinc / Laravel Bank Statements

Licence: mit
Laravel package to collect your bank statements history. Currently support for parsing statements history from BCA, Mandiri, BNI, and MUAMALAT e-banking websites.

Projects that are alternatives of or similar to Laravel Bank Statements

Laravel Rest Api
Powerful RestAPI plugin for Laravel
Stars: ✭ 90 (-14.29%)
Mutual labels:  laravel-package
Laravel Google Translate
This package makes using the Google Translate API in your laravel app a breeze with minimum to no configuration, clean syntax and a consistent package API.
Stars: ✭ 97 (-7.62%)
Mutual labels:  laravel-package
Timeoverflow
🏦 ⌛ A time banking system
Stars: ✭ 100 (-4.76%)
Mutual labels:  bank
Dropzone Laravel Image Upload
Laravel 5.2 and Dropzone.js auto image uploads with removal links
Stars: ✭ 92 (-12.38%)
Mutual labels:  laravel-package
Lara Lens
Laravel package for display diagnostic (config, database, http connections...)
Stars: ✭ 96 (-8.57%)
Mutual labels:  laravel-package
Grawler
Grawler is a tool written in PHP which comes with a web interface that automates the task of using google dorks, scrapes the results, and stores them in a file.
Stars: ✭ 98 (-6.67%)
Mutual labels:  scraping
Laravel Id Generator
Easy way to generate custom ID from database table in Laravel framework.
Stars: ✭ 88 (-16.19%)
Mutual labels:  laravel-package
Languagepod101 Scraper
Python scraper for Language Pods such as Japanesepod101.com 👹 🗾 🍣 Compatible with Japanese, Chinese, French, German, Italian, Korean, Portuguese, Russian, Spanish and many more! ✨
Stars: ✭ 104 (-0.95%)
Mutual labels:  scraping
Laravel Tracer
Shows the path of each blade file loaded in a template
Stars: ✭ 96 (-8.57%)
Mutual labels:  laravel-package
Elasticsearch Eloquent
⚡️ Eloquent models for Elasticsearch.
Stars: ✭ 100 (-4.76%)
Mutual labels:  laravel-package
Laravel Favicon Extractor
Extract a favicon from any website and save it to your local storage
Stars: ✭ 92 (-12.38%)
Mutual labels:  laravel-package
Nintendeals
Library with a set of tools for scraping information about Nintendo games and its prices across all regions (NA, EU and JP).
Stars: ✭ 94 (-10.48%)
Mutual labels:  scraping
Laravel Ui Adminlte
Laravel UI Frontend Preset for AdminLTE with Laravel Fortify support.
Stars: ✭ 98 (-6.67%)
Mutual labels:  laravel-package
Former
A powerful form builder, for Laravel and other frameworks (stand-alone too)
Stars: ✭ 1,305 (+1142.86%)
Mutual labels:  laravel-package
Dotnetcrawler
DotnetCrawler is a straightforward, lightweight web crawling/scrapying library for Entity Framework Core output based on dotnet core. This library designed like other strong crawler libraries like WebMagic and Scrapy but for enabling extandable your custom requirements. Medium link : https://medium.com/@mehmetozkaya/creating-custom-web-crawler-with-dotnet-core-using-entity-framework-core-ec8d23f0ca7c
Stars: ✭ 100 (-4.76%)
Mutual labels:  scraping
Laravel Sync Migration
Developer tool helps to sync migrations without refreshing the database
Stars: ✭ 89 (-15.24%)
Mutual labels:  laravel-package
Iranianbanklogos
Iranian bank logos - لوگوهای بانک های ایران
Stars: ✭ 97 (-7.62%)
Mutual labels:  bank
D4n155
OWASP D4N155 - Intelligent and dynamic wordlist using OSINT
Stars: ✭ 105 (+0%)
Mutual labels:  scraping
Laravel Stats
📈 Get insights about your Laravel or Lumen Project
Stars: ✭ 1,386 (+1220%)
Mutual labels:  laravel-package
Talk
Talk is a Laravel 5 based realtime users messaging and chatting system
Stars: ✭ 1,366 (+1200.95%)
Mutual labels:  laravel-package

Bank Statements Collector

Laravel package to collect your bank statements history. Currently support for parsing statements history from BCA, Mandiri, BNI, and MUAMALAT e-banking websites.

**Read and make sure you understand everything first before submiting your questions. Create a issue if you found a bug.

Requirements

Check the composer.json file

Support Laravel versions :

  • 5.4.*
  • 5.5.*
  • 5.6.*

Installation

$ php composer.phar require sule/bank-statements

After you have installed package, open your Laravel config file config/app.php and add the following lines.

In the $providers array add the service provider for this package.

Sule\BankStatements\Provider\LaravelServiceProvider::class

Create migrations

$ php artisan bank-statements:accounts-table
$ php artisan bank-statements:table

Do migration

$ php artisan migrate

Regarding the BCA explained in NOTES below, you need to modify the "config/database.php" file. Adding modes to allow incorrect date format (i.e 2017-03-00)

'mysql' => [
    'driver' => 'mysql',
    'host' => env('DB_HOST', '127.0.0.1'),
    'port' => env('DB_PORT', '3306'),
    'database' => env('DB_DATABASE', 'forge'),
    'username' => env('DB_USERNAME', 'forge'),
    'password' => env('DB_PASSWORD', ''),
    'charset' => 'utf8mb4',
    'collation' => 'utf8mb4_unicode_ci',
    'prefix' => '',
    'strict' => env('DB_STRICT', true),
    // Explicitly enable specific modes, overriding strict setting
    'modes' => [
        'STRICT_TRANS_TABLES',
        'ERROR_FOR_DIVISION_BY_ZERO',
        'NO_AUTO_CREATE_USER',
        'NO_ENGINE_SUBSTITUTION',
        'ALLOW_INVALID_DATES'
    ],
    'engine' => null,
],

Code Examples

Each collector require a bank account data created. Create one first.

$accountProvider = app(\Sule\BankStatements\Account::class);

$data = [
    'title'         => 'BCA',
    'url'           => 'https://ibank.klikbca.com',
    'collector'     => 'bca',
    'name'          => 'Your name',
    'user_id'       => 'yourloginuserid',
    'password'      => encrypt('yourloginpassword'),
    'last_activity' => time(),
    'created_at'    => new DateTime(),
    'updated_at'    => new DateTime()
];

$accountProvider->create($data);

Available collectors :

To start collecting (scrapping) from registered e-banking website accounts

// I think 6 days range is good enough
$startOfMonth = (Carbon::now())->startOfMonth();
$startDate    = (Carbon::now())->subDays(6);
$endDate      = Carbon::now();

// Some e-banking websites does not allow us to collect more than a month
// from current date
// Use first date of current month if 6 days are to much
if ($startOfMonth->month != $startDate->month || $startOfMonth->year != $startDate->year) {
    $startDate = $startOfMonth;
}

$statementProvider = app(\Sule\BankStatements\Statement::class);
$statementProvider->collect($startDate, $endDate);

The whole collected statements history will be saved into a table, you can query them using below codes example

// Set specific bank account ID if required
$accountId = 0;

// Set specific statement type "CR" or "DB"
$type = '';

// Set specific date range
$fromDate = '';
$toDate   = '';

$statementProvider = app(\Sule\BankStatements\Statement::class);
$collection = $statementProvider->search([
    'bank_account_id' => $accountId, 
    'type'            => $type, 
    'from_date'       => $fromDate, 
    'end_date'        => $toDate, 
    'order_by'        => 'id'
]);

// Then do whatever you want with the collection result

NOTES

BCA e-banking website does not provide a correct date for new statement (today), that will be updated by them in the next day.

Each statement data will be having a unique ID when stored in table, to make sure does not re-created. Regarding BCA statement data, the date will be updated if found in your next collecting process. You can find the data used to create the unique ID in each collector class.

Don't login to e-banking websites manually at the same time with the collector process. All e-banking websites does not allow multiple login attempt.

Make sure the user ID and password provided are correct, because all e-banking websites will block your account if failed three times. If you failed twice, do a success login manually first, then try again the collector process.

Don't execute via cron schedule. Just do it when you really need. Because in case you does not know if previous process is really done (logged out from the e-banking website) or maybe your account will be blocked for suspecious activities.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Configuration

Most configuration can be overrided in your .env file. All of them having default value.

BANK_CLIENT_USER_AGENT
    Web browser user agent going to use for CURL client.
BANK_CLIENT_IP_ADDRESS
    IP Address going to use for CURL client.
BANK_CLIENT_REQUEST_DELAY
    Time delay for each CURL request.
BANK_CLIENT_TIMEOUT
    CURL request timeout.
BANK_CLIENT_DEBUG
    CURL request debug.
BANK_COLLECTOR
    Collector type, currently only support for web parser.
BANK_TEMP_STORAGE_PATH
    Temporary storage path.
DB_CONNECTION
    Database connection going to use.
BANK_ACCOUNTS_TABLE
    Database table to store bank accounts information.
BANK_STATEMENTS_TABLE
    Database table to store bank statements history.

To modify the configuration file, the default config file need to be published first. You can find it later in "config/sule/bank-statements.php"

$ php artisan vendor:publish --provider="Sule\BankStatements\Provider\LaravelServiceProvider"

Contributing

How to add your own bank collector (scrapper)

  • Copy a existing collector class inside "/src/Collector/Web" folder for your reference.
  • Check "\Sule\BankStatements\Collector\WebInterface" for all methods required.
  • Insert your new collector class into "/config/config.php" file.
  • Test your new collector.

Contributions to the Laravel Bank Statements library are very welcome

Android App

Recently a Android app released to help you see transaction history and balance from multiple internet banking, and it's called "CekDuit".

You can also ask [email protected] to buy the source code, if you interested to use something like CekDuit android app but worrying about your data security. The source code will not having Ads, registration, and only able to check BCA + BNI + Mandiri internet banking, because BRI require additional server side captcha solver. The source code for personal use only. You should have ability to build and install into your android phone by your self.

CekDuit

Using the same logic as this repository to collect the transaction history, but running only on the device, so the data only stored in the device. The source code currently is not open sourced.

License

Bank Statements Collector is licensed under the MIT License.

Author : Sulaeman

Contributors :

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].