Esempio n. 1
0
 /**
  * Prevent enabling Paypal Adaptive if Multivendor is not installed and enabled
  *
  * @param \XLite\Model\Payment\Method $method Payment method object
  *
  * @return boolean
  */
 public function canEnable(\XLite\Model\Payment\Method $method)
 {
     return parent::canEnable($method) && Paypal\Main::PP_METHOD_PAD == $method->getServiceName() && \XLite\Core\Database::getRepo('XLite\\Model\\Module')->isModuleEnabled('XC\\MultiVendor');
 }
Esempio n. 2
0
 /**
  * Prevent enabling Paypal Standard if Paypal Advanced is already enabled
  *
  * @param \XLite\Model\Payment\Method $method Payment method object
  *
  * @return boolean
  */
 public function canEnable(\XLite\Model\Payment\Method $method)
 {
     return parent::canEnable($method) && Paypal\Main::PP_METHOD_PPS == $method->getServiceName() && !$this->isPaypalAdvancedEnabled();
 }
Esempio n. 3
0
 /**
  * Prevent enabling Paypal Standard if Express Checkout is already enabled
  * 
  * @param \XLite\Model\Payment\Method $method Payment method object
  *  
  * @return boolean
  */
 public function canEnable(\XLite\Model\Payment\Method $method)
 {
     return parent::canEnable($method) && \XLite\Module\CDev\Paypal\Main::PP_METHOD_PPS == $method->getServiceName() && !$this->isExpressCheckoutEnabled();
 }