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.

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(\%values)

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");

statement(\%values)

This method will retrieve an Account Statement (Kontoauszug). 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",

logout()

This method will just log out the website and it's only existent 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.02 Sat May 03 16:30:00 2003 - first public CPAN release

0.01 Sat Apr 19 02:22:15 2003 - original version;

AUTHOR

Roland Moriz
rmoriz@cpan.org && roland@moriz.de
http://www.roland-moriz.de/

Disclaimer stolen from Simon Cozens' Finance::Bank::LloydsTSB without asking for permission %-)

CREDITS

- Thomas Eibner 
- Casey West
- Andy Lester for WWW::Mechanize

... and all the people I forgot to mention :-)

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

WWW::Mechanize, Finance::Bank::LloydsTSB