Finance-Bank-ID-BCA

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

    Finance::Bank::ID::BCA - Check your BCA accounts from Perl

VERSION
    This document describes version 0.500 of Finance::Bank::ID::BCA (from
    Perl distribution Finance-Bank-ID-BCA), released on 2019-05-10.

SYNOPSIS
    If you just want to download banking statements, and you use Linux/Unix,
    you might want to use the download-bca script instead of having to deal
    with this library directly.

    If you want to use the library in your Perl application:

        use Finance::Bank::ID::BCA;

        # FBI::BCA uses Log::ger. to show logs to, for example, screen:
        use Log::ger::Output 'Screen';

        my $ibank = Finance::Bank::ID::BCA->new(
            username => 'ABCDEFGH1234', # opt if only using parse_statement()
            password => '123456',       # idem
            verify_https => 1,          # default is 0
            #https_ca_dir => '/etc/ssl/certs', # default is already /etc/ssl/certs
        );

        eval {
            $ibank->login(); # dies on error

            my @accts = $ibank->list_accounts();

            my $bal = $ibank->check_balance($acct); # $acct is optional

            my $stmt = $ibank->get_statement(
                account    => ..., # opt, default account will be used if undef
                days       => 31,  # opt
                start_date => DateTime->new(year=>2009, month=>10, day=>6),
                                   # opt, takes precedence over 'days'
                end_date   => DateTime->today, # opt, takes precedence over 'days'
            );

            print "Transactions: ";
            for my $tx (@{ $stmt->{transactions} }) {
                print "$tx->{date} $tx->{amount} $tx->{description}\n";
            }
        };
        warn if $@;

        # remember to call this, otherwise you will have trouble logging in again
        # for some time
        $ibank->logout();

    Utility routines:

        # parse HTML statement directly
        my $res = $ibank->parse_statement($html);

DESCRIPTION
    This module provide a rudimentary interface to the web-based online
    banking interface of the Indonesian Bank Central Asia (BCA) at
    https://ibank.klikbca.com. You will need either Crypt::SSLeay or
    IO::Socket::SSL installed for HTTPS support to work (and strictly
    Crypt::SSLeay to enable certificate verification). WWW::Mechanize is
    required but you can supply your own mech-like object.

    This module can only login to the retail/personal version of the site
    (KlikBCA perorangan) and not the corporate/business version (KlikBCA
    bisnis) as the later requires VPN and token input on login. But this
    module can parse statement page from both versions.

    This module has been tested with the following savings products: Tahapan
    (IDR), BCA Dolar (USD).

    Warning: This module is neither offical nor is it tested to be 100%
    safe! Because of the nature of web-robots, everything may break from one
    day to the other when the underlying web interface changes.

WARNING
    This warning is from Simon Cozens' "Finance::Bank::LloydsTSB", and seems
    just as apt here.

    This is code for online banking, and that means your money, and that
    means BE CAREFUL. You are encouraged, nay, expected, to audit the source
    of this module yourself to reassure yourself that I am not doing
    anything untoward with your banking data. This software is useful to me,
    but is provided under NO GUARANTEE, explicit or implied.

ERROR HANDLING AND DEBUGGING
    Most methods die() when encountering errors, so you can use eval() to
    trap them.

    Full response headers and bodies are dumped to a separate logger. See
    documentation on "new()" below and the sample script in examples/
    subdirectory in the distribution.

ATTRIBUTES
METHODS
  new(%args)
    Create a new instance. %args keys:

    *   username

        Optional if you are just using utility methods like
        "parse_statement()" and not "login()" etc.

    *   password

        Optional if you are just using utility methods like
        "parse_statement()" and not "login()" etc.

    *   mech

        Optional. A WWW::Mechanize-like object. By default this module
        instantiate a new Finance::BankUtils::ID::Mechanize (a
        WWW::Mechanize subclass) object to retrieve web pages, but if you
        want to use a custom/different one, you are allowed to do so here.
        Use cases include: you want to retry and increase timeout due to
        slow/unreliable network connection (using
        WWW::Mechanize::Plugin::Retry), you want to slow things down using
        WWW::Mechanize::Sleepy, you want to use IE engine using
        Win32::IE::Mechanize, etc.



( run in 1.068 second using v1.01-cache-2.11-cpan-0bb4e1dffa6 )