protected function _getFileName() { $sFileName = ''; if (oxSession::hasVar('debugPHP') && oxSession::getVar('debugPHP') !== true) { $sFileName = oxSession::getVar('debugPHP'); } return $sFileName .= isAdmin() ? '_admin' : '_shop'; }
/** * @overload */ public function executePayment($dAmount, &$oOrder) { if (!in_array($oOrder->oxorder__oxpaymenttype->rawValue, array("paymill_cc", "paymill_elv"))) { return parent::executePayment($dAmount, $oOrder); } if (oxSession::hasVar('paymill_token')) { $this->_token = oxSession::getVar('paymill_token'); } else { oxUtilsView::getInstance()->addErrorToDisplay("No Token was provided"); oxUtils::getInstance()->redirect($this->getConfig()->getSslShopUrl() . 'index.php?cl=payment', false); } $this->getSession()->setVar("paymill_identifier", time()); $this->_apiUrl = paymill_util::API_ENDPOINT; $this->_iLastErrorNo = null; $this->_sLastError = null; $this->_initializePaymentProcessor($dAmount, $oOrder); if ($this->_getPaymentShortCode($oOrder->oxorder__oxpaymenttype->rawValue) === 'cc') { $this->_paymentProcessor->setPreAuthAmount((int) oxSession::getVar('paymill_authorized_amount')); } $this->_loadFastCheckoutData(); $this->_existingClientHandling($oOrder); if ($this->_token === 'dummyToken') { $prop = 'paymill_fastcheckout__paymentid_' . $this->_getPaymentShortCode($oOrder->oxorder__oxpaymenttype->rawValue); $this->_paymentProcessor->setPaymentId($this->_fastCheckoutData->{$prop}->rawValue); } $result = $this->_paymentProcessor->processPayment(); $this->log($result ? 'Payment results in success' : 'Payment results in failure', null); if ($result) { $saveData = array('oxid' => $oOrder->oxorder__oxuserid->rawValue, 'clientid' => $this->_paymentProcessor->getClientId()); if (oxConfig::getInstance()->getShopConfVar('PAYMILL_ACTIVATE_FASTCHECKOUT')) { $paymentColumn = 'paymentID_' . strtoupper($this->_getPaymentShortCode($oOrder->oxorder__oxpaymenttype->rawValue)); $saveData[$paymentColumn] = $this->_paymentProcessor->getPaymentId(); } $this->_fastCheckoutData->assign($saveData); $this->_fastCheckoutData->save(); if (oxConfig::getInstance()->getShopConfVar('PAYMILL_SET_PAYMENTDATE')) { $this->_setPaymentDate($oOrder); } // set transactionId to session for updating the description after order execute $transactionId = $this->_paymentProcessor->getTransactionId(); $this->getSession()->setVar('paymillPgTransId', $transactionId); } else { oxUtilsView::getInstance()->addErrorToDisplay($this->_getErrorMessage($this->_paymentProcessor->getErrorCode())); } return $result; }
/** * return the Link back to shop * * @return bool */ public function showBackToShop() { return $this->getConfig()->getConfigParam('iNewBasketItemMessage') == 3 && oxSession::hasVar('_backtoshop'); }
public function setSearchText() { $aConfig = $this->getConfigFile(); if ($aConfig['filter']['search'] == 1 && !empty($aConfig['filter']['sSearchText']) && (!oxSession::hasVar('debugPHPSearch') || oxSession::getVar('debugPHPSearch') != $aConfig['filter']['sSearchText'])) { oxSession::setVar('debugPHPSearch', $aConfig['filter']['sSearchText']); } }