NAME
Finance::Bank::DE::NetBank - Check your SpardaBank Bank Accounts with Perl
SYNOPSIS
use Finance::Bank::DE::NetBank;
my $account = Finance::Bank::DE::NetBank->new(
CUSTOMER_ID => "12345678",
ACCOUNT_ID => "12345678",
PASSWORD => "ROUTE66",
BLZ => "70090500",
);
$account->connect();
$account->login();
print $account->saldo();
$account->logout();
DESCRIPTION
This module provides a very limited interface to the webbased online banking interface of the German "NetBank e.G." operated by Sparda-Datenverarbeitung e.G.. It will only work with German NetBank accounts - e.g. the Austrian Sparda Bank Accounts will not work.
It uses OOD and doesn't export anything.
WARNING! This module is neither offical nor is it tested to be 100% save! Because of the nature of web-robots, everything may break from one day to the other when the underlaying web interface changes.
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.
You can find some basic test scripts for manual testing against the demo-banking accounts within the directory "test" in the source directry.
METHODS
new(%values)
This constructor will set the default values and/or user provided values for connection and authentication.
my $account = Finance::Bank::DE::NetBank->new (
BASE_URL => "https://www.bankingonline.de/sparda-banking/view/",
BLZ => "70090500",
CUSTOMER_ID => "demo",
PASSWORD => "",
ACCOUNT => "2777770",
AGENT_TYPE => "Internet Explorer 6",
, @_);
If you don't provide any values the module will automatically use the demo account.
CUSTOMER_ID is your "Kundennummer" and ACCOUNT is the "Kontonummer" (if you have only one account you can skip that)
connect()
This method will create the user agent and connect to the online banking website. Also this (done by WWW::Mechanize) automagically handles the session-id handling.
$account->connect();
login(%values)
This method will try to log in with the provided authentication details. If nothing is specified the values from the constructor or the defaults will be used.
$account->login(ACCOUNT => "1234");
saldo(%values)
This method will return the current account balance called "Saldo". The method uses the account number if previously set.
You can override/set it:
$account->saldo(ACCOUNT => "5555555");
statement(%values)
This method will retrieve an account statement (Kontoauszug) and return a hashref.
You can specify the timeframe of the statement by passing different arguments: The value of TIMEFRAME can be "1" (last day only), "30" (last 30 days only), "alle" (all possible) or "variable" (between START_DATE and END_DATE only).
$account->statement(
TIMEFRAME => "variabel",
START_DATE => "10.04.2005",
END_DATE => "02.05.2005",
);
transfer()
logout()
This method will just log out the website and it only exists to keep the module logic clean ;-)
USAGE
use Finance::Bank::DE::NetBank;
use Data::Dumper;
my $account = Finance::Bank::DE::NetBank->new(
BLZ => "70090500",
CUSTOMER_ID => "xxxxxxx",
ACCOUNT => "yyyyyyy",
PASSWORD => "zzzzzz",
);
$account->connect();
$account->login();
print Dumper($account->statement(
TIMEFRAME => "variabel",
START_DATE => "10.04.2005",
END_DATE => "02.05.2005",
)
);
$account->logout();
BUGS
Please report bugs via http://rt.cpan.org/NoAuth/Bugs.html?Dist=Finance-Bank-DE-NetBank or email the author.
HISTORY
1.00 Tue Dec 14 00:43:00 2005 - changed URL to barrier free version (works without that new captcha) - replaced buggy html scraping of saldo(). saldo() now uses statement() to retrive the value.
0.02 Sun May 04 15:45:00 2003 - documentation fixes
0.01 Sun May 04 03:00:00 2003 - original version;
THANK YOU
Torsten Mueller (updated URL, saldo() bug reporting)
AUTHOR
Roland Moriz
rmoriz@cpan.org
http://www.perl-freelancer.de/
Disclaimer stolen from Simon Cozens' Finance::Bank::LloydsTSB without asking for permission %-)
COPYRIGHT
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
SEE ALSO
Finance::Bank::DE::SpardaBank, WWW::Mechanize, Finance::Bank::LloydsTSB