예제 #1
0
 /**
  * Set $ignoreLongCalculations variable
  *
  * @param boolean $value Mode
  *
  * @return void
  */
 public static function setIgnoreLongCalculationsMode($value)
 {
     if (true == $value && \XLite\Module\CDev\XPaymentsConnector\Core\Iframe::getInstance()->useIframe() && \XLite\Core\Request::getInstance()->xpc_iframe) {
         // Workaround for checkCheckoutAction() method of controller.
         // Otherwise shippings might be not calculated
         $value = false;
     }
     parent::setIgnoreLongCalculationsMode($value);
 }
예제 #2
0
 /**
  * Do initial payment
  *
  * @return string Status code
  */
 protected function doInitialPayment()
 {
     $status = parent::doInitialPayment();
     if (static::PROLONGATION == $status && \XLite\Module\CDev\XPaymentsConnector\Core\Iframe::getInstance()->useIframe()) {
         exit;
     }
     return $status;
 }
예제 #3
0
 /**
  * Get iframe singleton
  *
  * @return boolean
  */
 public function getIframe()
 {
     return \XLite\Module\CDev\XPaymentsConnector\Core\Iframe::getInstance();
 }
예제 #4
0
 /**
  * Check if widget is visible
  *
  * @return boolean
  */
 protected function isVisible()
 {
     $pm = $this->getCart()->getPaymentMethod();
     return parent::isVisible() && $pm && 'Module\\CDev\\XPaymentsConnector\\Model\\Payment\\Processor\\XPayments' == $pm->getClass() && \XLite\Module\CDev\XPaymentsConnector\Core\Iframe::getInstance()->useIframe();
 }