Finance::Bank::HDFC - Interface to the HDFC netbanking service


Finance-Bank-HDFC documentation  | view source Contained in the Finance-Bank-HDFC distribution.

Index


NAME

Top

Finance::Bank::HDFC - Interface to the HDFC netbanking service

VERSION

Top

This documentation refers to version 0.14

SYNOPSIS

Top

    use Finance::Bank::HDFC;

    my $bank = Finance::Bank::HDFC->new;
    $bank->login({
        cust_id   => 'xxx',
        password  => 'xxx',
    });
    print $bank->get_balance . "\n";

    # mini statement
    my @statements = $bank->get_mini_statement();
    for (@statements) {
        print "Date: " . $_->{date_transaction} . "\n";
        print "Amount: " . $_->{amount} . "\n";
        print "Balance: " . $_->{balance} . "\n";
    }

  $bank->logout;

DESCRIPTION

Top

This module provides an interface to the HDFC netbanking service at https://netbanking.hdfcbank.com/netbanking/

METHODS

Top

new()

Constructor for this class. Currently requires no arguments.

login()

Login to the netbanking service. Requires hashref of named parameters.

* cust_id - Your HDFC customer ID
* password - Your netbanking password (IPIN)

Dies on error.

get_balance()

Returns account balance. Dies on error.

get_mini_statement()

Returns account mini statement.

It returns an array of hashrefs. Each hashref has the following keys:

* date_transaction
* description
* ref_chq_num
* date_value
* amount
* balance
* type

logout()

Logout from the netbanking service. Remember to always call this method at the end of your program or you may face difficulties logging in the next time.

Dies on error.

set_timeout()

Sets the HTTP timeout. Parameters:

* timeout => HTTP timeout in seconds

Returns the timeout just set.

REQUIRES

Top

LWP::UserAgent, Crypt::SSLeay, version, Readonly

WARNING

Top

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.

AUTHOR

Top

Rohan Almeida <rohan@almeida.in>

COPYRIGHT AND LICENSE

Top


Finance-Bank-HDFC documentation  | view source Contained in the Finance-Bank-HDFC distribution.