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

Source for file clieop_transaction.php

Documentation is available at clieop_transaction.php

  1. <?php
  2. /* vim: set expandtab tabstop=4 shiftwidth=4: */
  3. // +----------------------------------------------------------------------+
  4. // | PHP Version 4                                                        |
  5. // +----------------------------------------------------------------------+
  6. // | Copyright (c) 1997-2003 The PHP Group                                |
  7. // +----------------------------------------------------------------------+
  8. // | This source file is subject to version 2.0 of the PHP license,       |
  9. // | that is bundled with this package in the file LICENSE, and is        |
  10. // | available at through the world-wide-web at                           |
  11. // | http://www.php.net/license/2_02.txt.                                 |
  12. // | If you did not receive a copy of the PHP license and are unable to   |
  13. // | obtain it through the world-wide-web, please send a note to          |
  14. // | license@php.net so we can mail you a copy immediately.               |
  15. // +----------------------------------------------------------------------+
  16. // | Authors: Dave Mertens <dmertens@zyprexia.com>                        |
  17. // +----------------------------------------------------------------------+
  18. //
  19. // $Id: clieop_transaction.php,v 1.7 2003/01/04 11:56:14 mj Exp $
  20.  
  21. //Define some constants for easy programming  ;-)
  22.  
  23. /**
  24. * Constant for debtor transactions
  25. @const CLIEOP_TRANSACTIE_INCASSO Clieop transaction code for debtor transactions
  26. */
  27. define"CLIEOP_TRANSACTIE_INCASSO""10" );    //Incasso transaction type (debtor)
  28.  
  29. /**
  30. * Constant for creditor transactions
  31. @const CLIEOP_TRANSACTIE_BETALING Clieop transaction code for creditor transactions
  32. */
  33. define"CLIEOP_TRANSACTIE_BETALING""00" );     //betaling transaction type (creditor)
  34.  
  35. /**
  36. * Data holder for payment post
  37. *
  38. * Please note that some function names are partly in Dutch. Clieop03 is
  39. * a Dutch banking standard and they have chosen to use Dutch line descriptions
  40. *
  41. * The TransactionPayment class is a data-holder for the main clieop class.
  42. *
  43. @version $Revision: 1.7 $
  44. @access public
  45. @package Payment_Clieop
  46. @author Dave Mertens <dmertens@zyprexia.com>
  47. */
  48. {
  49.     /**
  50.     * @var string 
  51.     * @access private
  52.     * @values 0000 (creditor) or 1002 (Debtor)
  53.     */
  54.     var $_TransactionType;
  55.  
  56.     /**
  57.     * @var numeric string
  58.     * @access private
  59.     * @values CREDITOR or DEBTOR
  60.     */
  61.     var $_TransactionName;
  62.  
  63.     /**
  64.     * @var integer 
  65.     * @access private
  66.     */
  67.     var $_Amount;
  68.  
  69.     /**
  70.     * @var string 
  71.     * @access private
  72.     */
  73.     var $_AccountNumberSource;
  74.  
  75.     /**
  76.     * @var string 
  77.     * @access private
  78.     */
  79.     var $_AccountNumberDest;
  80.  
  81.     /**
  82.     * @var string 
  83.     * @access private
  84.     */
  85.     var $_InvoiceReference;
  86.  
  87.     /**
  88.     * @var string 
  89.     * @access private
  90.     */
  91.     var $_Type;
  92.  
  93.     /**
  94.     * @var string 
  95.     * @access private
  96.     */
  97.     var $_Name;
  98.  
  99.     /**
  100.     * @var string 
  101.     * @access private
  102.     */
  103.     var $_City;
  104.  
  105.     /**
  106.     * @var string 
  107.     * @access private
  108.     */
  109.     var $_Desciption;
  110.     
  111.     /**
  112.     * Constructor for class
  113.     * @param string transactionType        - constant CLIEOP_TRANSACTIE_INCASSO or CLIEOP_TRANSACTIE_BETALING
  114.     * @return void 
  115.     * @access public
  116.     */
  117.     function TransactionPayment($transactionType)
  118.     {
  119.         $this->_Description = array();
  120.         if ($transactionType == "00")
  121.         {
  122.             //creditor payment
  123.             $this->_TransactionType "0000";
  124.             $this->_TransactionName "CREDITOR";
  125.         }
  126.         else
  127.         {
  128.             //debtor payment
  129.             $this->_TransactionType "1002";
  130.             $this->_TransactionName "DEBTOR";
  131.         }
  132.     }
  133.     
  134.     /**
  135.     * Fetch payment type
  136.     * @return string 
  137.     * @access public
  138.     */
  139.     function getPaymentType()
  140.     {
  141.         return $this->_TransactionName;    //return type of class
  142.     }
  143.     
  144.     /**
  145.     * return transaction type
  146.     * @return string 
  147.     * @access public
  148.     */
  149.     function getTransactionType()
  150.     {
  151.         return $this->_TransactionType;    //return special transaction type
  152.     }
  153.  
  154.     /**
  155.     * Property amount (in Eurocents)
  156.     * @param integer Value    - Payment amount in euro cents (Rounded on 2 digits)
  157.     * @return integer 
  158.     * @access public
  159.     */
  160.     function getAmount()
  161.     {
  162.         return $this->_Amount;
  163.     }
  164.     function setAmount($Value)
  165.     {
  166.         $this->_Amount $Value;    
  167.     }
  168.     
  169.     /**
  170.     * property AccountNumberSource
  171.     * @param string Value    - Source bank account number (Max 10 tokens)
  172.     * @return string 
  173.     * @access public
  174.     */
  175.     function getAccountNumberSource()
  176.     {
  177.         return $this->_AccountNumberSource;
  178.     }
  179.     function setAccountNumberSource($Value)
  180.     {
  181.         $this->_AccountNumberSource $Value;
  182.     }
  183.     
  184.     /**
  185.     * property AccountNumberDest
  186.     * @param string Value    - Destination bankaccount number
  187.     * @return string 
  188.     * @access public
  189.     */
  190.     function getAccountNumberDest()
  191.     {
  192.         return $this->_AccountNumberDest;
  193.     }
  194.     function setAccountNumberDest($Value)
  195.     {
  196.         $this->_AccountNumberDest $Value;
  197.     }
  198.     
  199.     /**
  200.     * property InvoiceReference
  201.     * @param string Value    - Invoice reference (Max 16 tokens)
  202.     * @return string 
  203.     * @access public
  204.     */
  205.     function getInvoiceReference()
  206.     {
  207.         return $this->_InvoiceReference;
  208.     }
  209.     function setInvoiceReference($Value)
  210.     {
  211.         $this->_InvoiceReference $Value;
  212.     }
  213.     
  214.     /**
  215.     * property Name
  216.     * @param string Value    - Name of creditor or debtor
  217.     * @return string 
  218.     * @access public
  219.     */
  220.     function getName()
  221.     {
  222.         return $this->_Name;
  223.     }
  224.     function setName($Value)
  225.     {
  226.         $this->_Name $Value;
  227.     }
  228.     
  229.     /**
  230.     * property City
  231.     * @param string Value    - City of creditor or debtor
  232.     * @return string 
  233.     * @access public
  234.     */
  235.     
  236.     function getCity()
  237.     {
  238.         return $this->_City;
  239.     }
  240.     function setCity($Value)
  241.     {
  242.         $this->_City $Value;
  243.     }
  244.     
  245.     /**
  246.     * property Description
  247.     * @param string Value    - Description for payment (Maximum 4 description lines)
  248.     * @return array 
  249.     * @access public
  250.     */
  251.     function getDescription()
  252.     {
  253.         //return description array
  254.         return $this->_Description;    
  255.     }
  256.     function setDescription($Value)
  257.     {
  258.         //only 4 descriptions are allowed for a payment post
  259.         if (sizeof($this->_Description< 5)
  260.         {
  261.             $this->_Description[$Value;
  262.         }
  263.     }
  264. }
  265.  
  266.  
  267. ?>

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