OXID eShop CE  4.8.12
 All Classes Files Functions Variables Pages
oxpaymentgateway.php
Go to the documentation of this file.
1 <?php
2 
10 {
15  protected $_blActive = false;
16 
21  protected $_oPaymentInfo = null;
22 
28  protected $_iLastErrorNo = 4;
29 
35  protected $_sLastError = null;
36 
44  public function setPaymentParams( $oUserpayment )
45  {
46  // store data
47  $this->_oPaymentInfo = & $oUserpayment;
48  }
49 
58  public function executePayment( $dAmount, & $oOrder )
59  {
60  $this->_iLastErrorNo = null;
61  $this->_sLastError = null;
62 
63  if ( !$this->_isActive()) {
64  return true; // fake yes
65  }
66 
67  // proceed with no payment
68  // used for other countries
69  if (@$this->_oPaymentInfo->oxuserpayments__oxpaymentsid->value == 'oxempty') {
70  return true;
71  }
72 
73  return false;
74  }
75 
81  public function getLastErrorNo()
82  {
83  return $this->_iLastErrorNo;
84  }
85 
91  public function getLastError()
92  {
93  return $this->_sLastError;
94  }
95 
101  protected function _isActive()
102  {
103  return $this->_blActive;
104  }
105 }