oxpaymentgateway.php

Go to the documentation of this file.
00001 <?php
00002 
00009 class oxPaymentGateway extends oxSuperCfg
00010 {
00011 
00017     protected $_blActive = false;
00018 
00024     protected $_oPaymentInfo = null;
00025 
00032     protected $_iLastErrorNo = 4;
00033 
00040     protected $_sLastError = null;
00041 
00047     public function setPaymentParams($oUserpayment)
00048     {
00049         // store data
00050         $this->_oPaymentInfo = & $oUserpayment;
00051     }
00052 
00061     public function executePayment($dAmount, & $oOrder)
00062     {
00063         $this->_iLastErrorNo = null;
00064         $this->_sLastError = null;
00065 
00066         if (!$this->_isActive()) {
00067             return true; // fake yes
00068         }
00069 
00070         // proceed with no payment
00071         // used for other countries
00072         if (@$this->_oPaymentInfo->oxuserpayments__oxpaymentsid->value == 'oxempty') {
00073             return true;
00074         }
00075 
00076         return false;
00077     }
00078 
00084     public function getLastErrorNo()
00085     {
00086         return $this->_iLastErrorNo;
00087     }
00088 
00094     public function getLastError()
00095     {
00096         return $this->_sLastError;
00097     }
00098 
00104     protected function _isActive()
00105     {
00106         return $this->_blActive;
00107     }
00108 }