OXID eShop CE  4.9.6
 All Classes Files Functions Variables Pages
oxpaymentgateway.php
Go to the documentation of this file.
1 <?php
2 
10 {
11 
17  protected $_blActive = false;
18 
24  protected $_oPaymentInfo = null;
25 
32  protected $_iLastErrorNo = 4;
33 
40  protected $_sLastError = null;
41 
47  public function setPaymentParams($oUserpayment)
48  {
49  // store data
50  $this->_oPaymentInfo = & $oUserpayment;
51  }
52 
61  public function executePayment($dAmount, & $oOrder)
62  {
63  $this->_iLastErrorNo = null;
64  $this->_sLastError = null;
65 
66  if (!$this->_isActive()) {
67  return true; // fake yes
68  }
69 
70  // proceed with no payment
71  // used for other countries
72  if (@$this->_oPaymentInfo->oxuserpayments__oxpaymentsid->value == 'oxempty') {
73  return true;
74  }
75 
76  return false;
77  }
78 
84  public function getLastErrorNo()
85  {
86  return $this->_iLastErrorNo;
87  }
88 
94  public function getLastError()
95  {
96  return $this->_sLastError;
97  }
98 
104  protected function _isActive()
105  {
106  return $this->_blActive;
107  }
108 }