예제 #1
0
파일: Method.php 프로젝트: kingsj/core
 /**
  * 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;
 }
예제 #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();
 }
예제 #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;
 }