cvs: pear /Payment_Clieop clieop.php package.xml
| From: | Dave Mertens | Date: | Wed, 03 Apr 2002 18:44:45 +0000 |
| Subject: | cvs: pear /Payment_Clieop clieop.php package.xml | ||
| Groups: | php.pear.cvs | ||
| Request: | Send a blank email to pear-cvs+get-3007@lists.php.net to get a copy of this message | ||
zyprexia Wed Apr 3 13:44:45 2002 EDT
Modified files:
/pear/Payment_Clieop clieop.php package.xml
Log:
Added transaction post functions
Index: pear/Payment_Clieop/clieop.php
diff -u pear/Payment_Clieop/clieop.php:1.1 pear/Payment_Clieop/clieop.php:1.2
--- pear/Payment_Clieop/clieop.php:1.1 Wed Apr 3 12:58:43 2002
+++ pear/Payment_Clieop/clieop.php Wed Apr 3 13:44:45 2002
@@ -16,7 +16,7 @@
// | Authors: Dave Mertens <dmertens@zyprexia.com> |
// +----------------------------------------------------------------------+
//
-// $Id: clieop.php,v 1.1 2002/04/03 17:58:43 zyprexia Exp $
+// $Id: clieop.php,v 1.2 2002/04/03 18:44:45 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).
@@ -25,7 +25,7 @@
/**
* Main clieop class
*
-* @version $Revision: 1.1 $
+* @version $Revision: 1.2 $
* @access public
* @author Dave Mertens <dmertens@zyprexia.com>
* @package Payment_Clieop
@@ -126,15 +126,148 @@
//init vars
$this->_ProcessDate = "000000"; //process ASAP
$this->_BatchNumber = 1;
+ $this->_Test = "T";
return 1;
}
+
+ /**
+ * INFOCODE: 0100
+ * Writes transaction header
+ * @param string transType - Type of transaction ('0000' for betaling, '1002'
for incasso)
+ * @param integer amount - Payment amount in Eurocents
+ * @param string accountNumberSource - Source bankaccount number
+ * @param string accountNumberDest - Destination bankaccount number
+ * @access private
+ * @return string
+ */
+ function writeTransactieInfo($transType, $amount, $accountNumberSource, $accountNumberDest)
+ {
+ $text = "0100"; //infocode
+ $text .= "A"; //variantcode
+ $text .= $this->numFiller($transType, 4); //transactiesoort
+ $text .= $this->numFiller($amount, 12); //Bedrag
+ $text .= $this->numFiller($accountNumberSource, 10); //Reknr betaler
+ $text .= $this->numFiller($accountNumberDest, 10); //Reknr begunstigde
+ $text .= $this->filler(9);
+
+ //return clieop line
+ return $text
+ }
+
+ /**
+ * INFOCODE: 0150
+ * Writes invoice reference clieop line
+ * @param string invoiceReference - Reference of invoice
+ * @access private
+ * @return string
+ */
+ function writeBetalingskenmerkInfo($invoiceReference)
+ {
+ $text = "0150"; //infocode
+ $text .= "A"; //variantcode
+ $text .= $this->alfaFiller($invoiceReference, 16); //betalings kenmerk
+ $text .= $this->filler(29);
+
+ //return clieop line
+ return $text;
+ }
+
+ /**
+ * INFOCODE: 0160
+ * Writes an description for the clieop file
+ * @param string description - Description of payment (Can be called maximum 4 times!)
+ * @access private
+ * @return string
+ */
+ function writeOmschrijvingInfo($description)
+ {
+ $text = "0160"; //infocode
+ $text .= "A"; //variantcode
+ $text .= $this->alfaFiller($description, 32); //omschrijving van post
+ $text .= $this->filler(13);
+
+ //return clieop line
+ return $text;
+ }
+
+ /**
+ * INFOCODE: 0170
+ * Write the creditor name record
+ * @param string name - Name of creditor
+ * @access private
+ * @return string
+ */
+ function writeNaambegunstigdeInfo($name)
+ {
+ $text = "0170"; //infocode
+ $text .= "B"; //variantcode
+ $text .= $this->alfaFiller($name, 35); //naam begunstigde
+ $text .= $this->filler(10);
+
+ //reurn clieop line
+ return $text;
+ }
+
+ /**
+ * INFOCODE: 0173
+ * Write the creditor city record
+ * @param string city - City of creditor
+ * @access private
+ * @return string
+ */
+ function writeWoonplaatsbegunstigdeInfo($city)
+ {
+ $text = "0173"; //infocode
+ $text .= "B"; //variantcode
+ $text .= $this->alfaFiller($city, 35); //woonplaats begunstigde
+ $text .= $this->filler(10);
+
+ //reurn clieop line
+ return $text;
+ }
+ /**
+ * INFOCODE: 0110
+ * Write the debtor name record
+ * @param string name - Name of debtor
+ * @access private
+ * @return string
+ */
+ function writeNaambetalerInfo($name)
+ {
+ $text = "0110"; //infocode
+ $text .= "B"; //variantcode
+ $text .= $this->alfaFiller($name, 35); //naam betaler
+ $text .= $this->filler(10);
+
+ //reurn clieop line
+ return $text;
+ }
+
+ /**
+ * INFOCODE: 0113
+ * Write the debtor city record
+ * @param string city - City of debtor
+ * @access private
+ * @return string
+ */
+ function writeWoonplaatsbetalerInfo($city)
+ {
+ $text = "0113"; //infocode
+ $text .= "B"; //variantcode
+ $text .= $this->alfaFiller($city, 35); //woonplaats betaler
+ $text .= $this->filler(10);
+
+ //reurn clieop line
+ return $text;
+ }
+
}
/**
* master object for clieop objects
*
-* @version $Revision: 1.1 $
+* @version $Revision: 1.2 $
* @access private
* @author Dave Mertens <dmertens@zyprexia.com>
* @package Payment_Clieop
Index: pear/Payment_Clieop/package.xml
diff -u pear/Payment_Clieop/package.xml:1.1 pear/Payment_Clieop/package.xml:1.2
--- pear/Payment_Clieop/package.xml:1.1 Wed Apr 3 12:43:08 2002
+++ pear/Payment_Clieop/package.xml Wed Apr 3 13:44:45 2002
@@ -3,8 +3,8 @@
<!-- do not use the "Type" attribute here, that one is only for
generated package.xml files -->
<package version="1.0">
- <name>Clieop</name>
- <summary>Clieop03 generating class for Ducth banking software</summary>
+ <name>Payment_Clieop</name>
+ <summary>Clieop03 generating class for Dutch banking software</summary>
<maintainers>
<maintainer>
<user>zyprexia</user>