NAME
Finance::Bank::DE::SpardaBank - Check your SpardaBank Bank Accounts with Perl
SYNOPSIS
use Finance::Bank::DE::SpardaBank;
my $account = Finance::Bank::DE::SpardaBank->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 "SpardaBank e.G." operated by Sparda-Datenverarbeitung e.G.. It will only work with German SpardaBank 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::SpardaBank->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.2003",
END_DATE => "02.05.2003",
);
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::SpardaBank;
use Data::Dumper;
my $account = Finance::Bank::DE::SpardaBank->new(
BLZ => "70090500",
CUSTOMER_ID => "xxxxxxx",
ACCOUNT => "yyyyyyy",
PASSWORD => "zzzzzz",
);
$account->connect();
$account->login();
print Dumper($account->statement(
TIMEFRAME => "variabel",
START_DATE => "10.04.2003",
END_DATE => "02.05.2003",
)
);
$account->logout();
BUGS
Please report bugs via http://rt.cpan.org/NoAuth/Bugs.html?Dist=Finance-Bank-DE-SpardaBank
SUPPORT
Support currently available via eMail to the author.
HISTORY
0.06 Sat Jun 07 20:00:00 2003 - improved Makefile to check for SSL support in LWP
0.05 Sat Jun 07 15:00:00 2003 - added alpha version of the transaction method - added 3 test scripts
0.04 Mon May 27 15:00:00 2003 - another try to fix POD :-)
0.03 Sun May 04 15:30:01 2003 - Documentation fixes (thanks castrox :-)) - Usability enhancements
0.02 Sat May 03 16:30:00 2003 - first public CPAN release
0.01 Sat Apr 19 02:22:15 2003 - original version;
CREDITS
Thomas Eibner
Casey West
Andy Lester for WWW::Mechanize
... and all the people I forgot to mention :-)
AUTHOR
Roland Moriz
rmoriz at cpan dot org / roland at moriz dot de
http://www.roland-moriz.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::NetBank, WWW::Mechanize, Finance::Bank::LloydsTSB