Beispiel #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);
 }
Beispiel #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;
 }
Beispiel #3
0
 /**
  * Get iframe singleton
  *
  * @return boolean
  */
 public function getIframe()
 {
     return \XLite\Module\CDev\XPaymentsConnector\Core\Iframe::getInstance();
 }
Beispiel #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();
 }