cvs: pear /Payment_Clieop clieop.php clieop_transaction.php

From: Date: Wed, 03 Apr 2002 17:58:44 +0000
Subject: cvs: pear /Payment_Clieop clieop.php clieop_transaction.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-3006@lists.php.net to get a copy of this message
zyprexia Wed Apr 3 12:58:44 2002 EDT Added files: /pear/Payment_Clieop clieop.php Modified files: /pear/Payment_Clieop clieop_transaction.php Log: Added main clieop class. Note that of the clieopPayment class only the variables are created. functions will be added later. Index: pear/Payment_Clieop/clieop_transaction.php diff -u pear/Payment_Clieop/clieop_transaction.php:1.2 pear/Payment_Clieop/clieop_transaction.php:1.3 --- pear/Payment_Clieop/clieop_transaction.php:1.2 Wed Apr 3 12:44:51 2002 +++ pear/Payment_Clieop/clieop_transaction.php Wed Apr 3 12:58:43 2002 @@ -16,7 +16,7 @@ // | Authors: Dave Mertens <dmertens@zyprexia.com> | // +----------------------------------------------------------------------+ // -// $Id: clieop_transaction.php,v 1.2 2002/04/03 17:44:51 zyprexia Exp $ +// $Id: clieop_transaction.php,v 1.3 2002/04/03 17:58:43 zyprexia Exp $ //Define some constants for easy programming ;-) define( "CLIEOP_TRANSACTIE_INCASSO", "10" ); //Incasso transaction type (debtor) @@ -30,7 +30,7 @@ * * The TransactionPayment class is a data-holder for the main clieop class. * -* @version $Revision: 1.2 $ +* @version $Revision: 1.3 $ * @access public * @package Payment_Clieop * @author Dave Mertens <dmertens@zyprexia.com> @@ -99,7 +99,6 @@ */ var $_Desciption; - /** * Constructor for class * @param string transactionType - constant CLIEOP_TRANSACTIE_INCASSO or CLIEOP_TRANSACTIE_BETALING Index: pear/Payment_Clieop/clieop.php +++ pear/Payment_Clieop/clieop.php <?php /* vim: set expandtab tabstop=4 shiftwidth=4: */ // +----------------------------------------------------------------------+ // | PHP Version 4 | // +----------------------------------------------------------------------+ // | Copyright (c) 1997-2002 The PHP Group | // +----------------------------------------------------------------------+ // | This source file is subject to version 2.0 of the PHP license, | // | that is bundled with this package in the file LICENSE, and is | // | available at through the world-wide-web at | // | http://www.php.net/license/2_02.txt. | // | If you did not receive a copy of the PHP license and are unable to | // | obtain it through the world-wide-web, please send a note to | // | license@php.net so we can mail you a copy immediately. | // +----------------------------------------------------------------------+ // | Authors: Dave Mertens <dmertens@zyprexia.com> | // +----------------------------------------------------------------------+ // // $Id: clieop.php,v 1.1 2002/04/03 17:58:43 zyprexia Exp $ /* Please note that public function names are partly in Dutch. This is because also the clieop data strings has a dutch names. (batchvoorloopinfo, transactieinfo, etc). */ /** * Main clieop class * * @version $Revision: 1.1 $ * @access public * @author Dave Mertens <dmertens@zyprexia.com> * @package Payment_Clieop */ class ClieopPayment extends clieop_baseobject { /** * @var string * @access private */ var $_SenderIdent; /** * @var string * @access private */ var $_FileIdent; /** * @var string * @access private */ var $_TransactionType; /** * @var string * @access private */ var $_ClieopText; /** * @var string * @access private */ var $_PrincipalAccountNumber; /** * @var string * @access private */ var $_PrincipalName; /** * @var integer * @access private */ var $_BatchNumber; /** * @var integer * @access private */ var $_TransactionCount; /** * @var integer * @access private */ var $_TotalAmount; /** * @var string * @access private */ var $_AccountChecksum; /** * @var string * @access private */ var $_Description; /** * @var date (in DDMMYY format) * @access private */ var $_ProcessDate; /** * @var boolean * @access private */ var $_Test; /** * @var string * @access private */ var $_TransactionText; /** * Constructor for class * @return void * @access public */ function clieopPayment() { //init vars $this->_ProcessDate = "000000"; //process ASAP $this->_BatchNumber = 1; return 1; } } /** * master object for clieop objects * * @version $Revision: 1.1 $ * @access private * @author Dave Mertens <dmertens@zyprexia.com> * @package Payment_Clieop */ class clieop_baseobject { /** * Alfa numeric filler * @param string text - Text which needs to filled up * @param integer length - The length of the required text * @return string * @access public */ function alfaFiller($text, $length) { //how many spaces do we need? $alfaLength = $length - strlen($text); //return string with spaces on right side return substr(str_repeat(" ", $alfaLength) . $text, $length); } /** * Numeric filler * @param string number - number which needs to filled up (Will be converted to a string) * @param integer length - The length of the required number * @return string * @access public */ function numFiller($number, $length) { //how many zeros do we need settype($number, "string"); //We need to be sure that number is a string. 001 will otherwise be parsed as 1 $numberLength = $lentgh - strlen($number) //return original number woth zeros on the left return substr(str_repeat("0", $numberLength) . $number, $length); } /** * Numeric filler * @param integer length - How many spaces do we need * @return string * @access public */ function Filler($Length) { return str_repeat(" ", $Length); } } ?>

« previous php.pear.cvs (#3006) next »