apidoc
[ class tree: apidoc ] [ index: apidoc ] [ all elements ]

Class: DTA

Source Location: /Payment_DTA-1.2.0/DTA.php

Class Overview


Dta class provides functions to create and handle with DTA files used in Germany to exchange informations about money transactions with banks or online banking programs.


Author(s):

Version:

  • $Revision: 0.81 $

Variables

Methods


Inherited Variables

Inherited Methods


Class Details

[line 75]
Dta class provides functions to create and handle with DTA files used in Germany to exchange informations about money transactions with banks or online banking programs.
  • Author: Hermann Stainer <hs@web-gear.com>
  • Version: $Revision: 0.81 $
  • Since: DTA 0.1


[ Top ]


Class Variables

$account_file_sender =

[line 88]

Account data for the file sender.

Type:   integer


[ Top ]

$exchanges =

[line 109]

Array of exchanges that the DTA file should contain.

Type:   integer


[ Top ]

$timestamp =

[line 102]

Current timestamp.

Type:   integer


[ Top ]

$type =

[line 81]

Type of DTA file, DTA_CREDIT or DTA_DEBIT.

Type:   integer


[ Top ]

$validString_chars =

[line 95]

Array of ASCII Codes of valid chars for DTA field data.

Type:   array


[ Top ]



Method Detail

DTA (Constructor)   [line 119]

DTA DTA( integer $type)

Constructor. The type of the DTA file must be set. One file can only contain credits (DTA_CREDIT) OR debits (DTA_DEBIT).

This is a definement of the DTA format.

  • Access: public

Parameters:

integer   $type   —  Determines the type of the DTA file. Either DTA_CREDIT or DTA_DEBIT. Must be set.

[ Top ]

addExchange   [line 254]

boolean addExchange( array $account_receiver, double $amount, array $purposes, [array $account_sender = array()])

Adds an exchange. First the account data for the receiver of the exchange is set.

In the case the DTA file contains credits, this is the payment receiver. In the other case (the DTA file contains debits), this is the account, from which money is taken away. If the sender is not specified, values of the file sender are used by default. Account data for receiver and sender contain name Name. Maximally 27 chars are allowed. bank_code Bank code. account_number Account number. additional_name If necessary, additional line for name (maximally 27 chars).

  • Access: public

Parameters:

array   $account_receiver   —  Receiver's account data.
double   $amount   —  Amount of money in this exchange. Currency: EURO
array   $purposes   —  Array of up to 15 lines (maximally 27 chars each) for description of the exchange.
array   $account_sender   —  Sender's account data.

[ Top ]

getFileContent   [line 314]

string getFileContent( )

Returns the full content of the generated DTA file. All added exchanges are processed.
  • Access: public

[ Top ]

makeValidString   [line 163]

string makeValidString( string $string)

Makes the given string valid for DTA files. German umlauts become uppercase, all other chars not allowed are replaced with space
  • Access: public

Parameters:

string   $string   —  String that should made valid.

[ Top ]

saveFile   [line 505]

boolean saveFile( string $filename)

Writes the DTA file.
  • Access: public

Parameters:

string   $filename   —  Filename.

[ Top ]

setAccountFileSender   [line 214]

boolean setAccountFileSender( array $account)

Set the sender of the DTA file. Must be set for valid DTA file.

The given account data is also used as default sender's account. Account data contains name Sender's name. Maximally 27 chars are allowed. bank_code Sender's bank code. account_number Sender's account number. additional_name If necessary, additional line for sender's name (maximally 27 chars).

  • Access: public

Parameters:

array   $account   —  Account data fot file sender.

[ Top ]

validString   [line 139]

boolean validString( string $string)

Checks if the given string contains only chars valid for fields in DTA files.
  • Access: public

Parameters:

string   $string   —  String that is checked.

[ Top ]


Documentation generated on Mon, 11 Mar 2019 14:19:42 -0400 by phpDocumentor 1.4.4. PEAR Logo Copyright © PHP Group 2004.