Esempio n. 1
0
 /**
  * Additional check for PPS 
  * 
  * @return boolean
  */
 public function isEnabled()
 {
     $result = parent::isEnabled();
     if ($result && \XLite\Module\CDev\Paypal\Main::PP_METHOD_PPS == $this->getServiceName()) {
         $result = !$this->getProcessor()->isExpressCheckoutEnabled();
     }
     return $result;
 }
Esempio n. 2
0
 /**
  * Check - can switch method or not
  *
  * @param \XLite\Model\Payment\Method $method Payment method
  *
  * @return boolean
  */
 protected function canSwitch(\XLite\Model\Payment\Method $method)
 {
     return $method->isEnabled() ? !$method->isForcedEnabled() : $method->canEnable();
 }
 /**
  * {@inheritDoc}
  */
 public function isEnabled()
 {
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'isEnabled', array());
     return parent::isEnabled();
 }
Esempio n. 4
0
 /**
  * Additional check for PPS
  *
  * @return boolean
  */
 public function isEnabled()
 {
     $result = parent::isEnabled();
     if ($result && Paypal\Main::PP_METHOD_PPS == $this->getServiceName()) {
         $result = !$this->getProcessor()->isPaypalAdvancedEnabled();
     }
     if (Paypal\Main::PP_METHOD_PC == $this->getServiceName()) {
         $result = Paypal\Main::isExpressCheckoutEnabled() && $this->getSetting('enabled');
     }
     return $result;
 }