Finance-Bank-Commerzbank

 view release on metacpan or  search on metacpan

lib/Finance/Bank/Commerzbank.pm  view on Meta::CPAN

  
}

sub write_file {
  my ($Data,$FileName)=@_;
  open( OUT , ">".$FileName);
  print OUT $Data;
  close(OUT);
}




package Finance::Bank::Commerzbank::Account;
# Basic OO smoke 
no strict;
sub AUTOLOAD { my $self=shift; $AUTOLOAD =~ s/.*:://; $self->{$AUTOLOAD} }

__END__
# Below is stub documentation for your module. You better edit it!

=head1 NAME

Finance::Bank::Commerzbank - Check your bank accounts from Perl

=head1 SYNOPSIS

  use Finance::Bank::Commerzbank;
  for (Finance::Bank::Commerzbank->check_balance(
        Teilnehmernummer  => $Teilnehmernummer, Kontonummer= $KtoNummer,
        PIN=> $PIN )) {
	printf ("Transaction No: %d - TradeDate: %s - Description: %s  - ValueDate:%s - Amount: %s\n",
	            $i,
		    $_->TradeDate,
	            $_->Description,
	            $_->ValueDate,
	            $_->Amount);

  }

  Finance::Bank::Commerzbank->money_transfer(
   Teilnehmernummer=>$Teilnehmernummer,
   PIN=>$PIN,
   EmpfaengerName=>"Fancy GMBH",
   EmpfaengerKto=>"8998817",
   EmpfaengerBLZ=>"30050000",
   Betrag_Eingabe=>"41,56",
   Verwendungszweck1=>"123123",
   Verwendungszweck2=>"RE 123123",
   Verwendungszweck3=>"Remark1",
   Verwendungszweck4=>"Remark2",

   Auftragskonto=>"133432100 EUR",
   TANPIN=>"123456");


=head1 DESCRIPTION

This module provides a rudimentary interface to the Commerzbank online
banking system at C<https://portal01.commerzbanking.de/P-Portal/XML/IFILPortal/pgf.html?Tab=1/>. You will need
either C<Crypt::SSLeay> or C<IO::Socket::SSL> installed for HTTPS
support to work with LWP.

=head1 CLASS METHODS

    check_balance(Teilnehmernummer => $Teilnehmernummer,  Kontonummer=>"133432100 EUR",PIN => $PIN)

Return a list of the last 90 days account transactions. 


  use Finance::Bank::Commerzbank;
  Finance::Bank::Commerzbank->money_transfer(
   Teilnehmernummer=>$Teilnehmernummer,
   PIN=>$PIN,
   EmpfaengerName=>"Fancy GMBH",
   EmpfaengerKto=>"8998817",
   EmpfaengerBLZ=>"30050000",
   Betrag_Eingabe=>"41,56",
   Verwendungszweck1=>"123123",
   Verwendungszweck2=>"RE 123123",
   Auftragskonto=>"133432100 EUR",
   TANPIN=>"123456");
   }

Method to transfer money, you must supply all values, carefully submit
the correct Auftragskonto. At the current stage this value must be provided
from outside. In future versions we try to select the correct main accout.


=head1 TODOS

At the current stage we protocol the temporary output from the HTML
side into temporary files under the /tmp/ directory. This will be 
changed in future versions. You could explicit force this if you 
supply the debug flag to the method call. In future releases the possible Accounts should be autodetected via a new method. At the current stage
you must parse the HTML output to find the correct Auftragskonto pattern.

=head1 WARNING

This is code for B<online banking>, and that means B<your money>, and
that means B<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 B<NO GUARANTEE>, explicit or implied.

=head1 AUTHOR

Tobias Herbert<tobi@cpan.org>

=cut



( run in 0.702 second using v1.01-cache-2.11-cpan-b16cb0d3907 )