/** * Get payment processor class * * @return string */ public function getClass() { $class = parent::getClass(); if (Paypal\Main::PP_METHOD_EC == $this->getServiceName()) { $className = 'XLite\\' . $class; /** @var \XLite\Model\Payment\Base\Processor $processor */ $processor = \XLite\Core\Operator::isClassExists($className) ? $className::getInstance() : null; if ($this->isForceMerchantAPI($processor)) { $class = 'Module\\CDev\\Paypal\\Model\\Payment\\Processor\\ExpressCheckoutMerchantAPI'; } } if (Paypal\Main::PP_METHOD_PC == $this->getServiceName()) { $className = 'XLite\\' . $class; /** @var \XLite\Model\Payment\Base\Processor $processor */ $processor = \XLite\Core\Operator::isClassExists($className) ? $className::getInstance() : null; if ($this->getExpressCheckoutPaymentMethod()->isForceMerchantAPI($processor)) { $class = 'Module\\CDev\\Paypal\\Model\\Payment\\Processor\\PaypalCreditMerchantAPI'; } } return $class; }
/** * {@inheritDoc} */ public function getClass() { $this->__initializer__ && $this->__initializer__->__invoke($this, 'getClass', array()); return parent::getClass(); }