當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Hook::backBeforePayment方法代碼示例

本文整理匯總了PHP中Hook::backBeforePayment方法的典型用法代碼示例。如果您正苦於以下問題:PHP Hook::backBeforePayment方法的具體用法?PHP Hook::backBeforePayment怎麽用?PHP Hook::backBeforePayment使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Hook的用法示例。


在下文中一共展示了Hook::backBeforePayment方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: displayOrderStep

 function displayOrderStep($params)
 {
     global $smarty, $cart, $currency, $cookie, $orderTotal;
     if ($cart->getOrderTotalLC() <= 0) {
         $order = new FreeOrder();
         $order->validateOrder(intval($cart->id), _PS_OS_PAYMENT_, 0, Tools::displayError('Free order', false));
         Tools::redirect('history.php');
     }
     // Redirect instead of displaying payment modules if any module are grafted on
     Hook::backBeforePayment(strval(Tools::getValue('back')));
     /* We may need to display an order summary */
     $smarty->assign($cart->getSummaryDetails());
     $cookie->checkedTOS = '1';
     $smarty->assign(array('HOOK_PAYMENT' => Module::hookExecPayment(), 'total_price' => floatval($orderTotal)));
     Tools::safePostVars();
     include_once dirname(__FILE__) . '/../../header.php';
     echo $this->display(__FILE__, 'orderpayment.tpl');
 }
開發者ID:redb,項目名稱:prestashop,代碼行數:18,代碼來源:orderpayment.php

示例2: _assignPayment

 protected function _assignPayment()
 {
     global $orderTotal;
     $invoice_address = new Address((int) self::$cart->id_address_invoice);
     if ($invoice_address->id_country != 110) {
         include_once _PS_MODULE_DIR_ . 'paypal/paypal.php';
         include_once _PS_MODULE_DIR_ . 'paypal/payment/paypalpayment.php';
         include_once _PS_MODULE_DIR_ . 'paypal/payment/submit.php';
         //GetPaypal stuff
         unset(self::$cookie->paypal_token);
         /*if (self::$cart->id_currency != $ppPayment->getCurrency((int) self::$cart->id_currency)->id) {
               self::$cart->id_currency = (int) ($ppPayment->getCurrency((int) self::$cart->id_currency)->id);
               self::$cookie->id_currency = (int) (self::$cart->id_currency);
               self::$cart->update();
               Tools::redirect('modules/' . $ppPayment->name . '/payment/submit.php');
           }*/
         $curr_sel_currency = CurrencyCore::getCurrency(self::$cart->id_currency);
         self::$smarty->assign(array('cust_currency' => self::$cart->id_currency, 'currency' => $curr_sel_currency, 'total' => self::$cart->getOrderTotal(true, Cart::BOTH), 'this_path_ssl' => Tools::getShopDomainSsl(true, true) . __PS_BASE_URI__ . 'modules/' . $ppPayment->name . '/', 'mode' => 'payment/'));
     }
     // Redirect instead of displaying payment modules if any module are grefted on
     Hook::backBeforePayment('order.php?step=3');
     /* We may need to display an order summary */
     self::$smarty->assign(self::$cart->getSummaryDetails());
     self::$smarty->assign(array('total_price' => Tools::ps_round((double) $orderTotal), 'taxes_enabled' => (int) Configuration::get('PS_TAX')));
     self::$cookie->checkedTOS = '1';
     parent::_assignPayment();
 }
開發者ID:priyankajsr19,項目名稱:shalu,代碼行數:27,代碼來源:OrderController.php

示例3: _assignPayment

 protected function _assignPayment()
 {
     global $orderTotal;
     // Redirect instead of displaying payment modules if any module are grefted on
     Hook::backBeforePayment('order.php?step=3');
     /* We may need to display an order summary */
     self::$smarty->assign(self::$cart->getSummaryDetails());
     self::$smarty->assign(array('total_price' => (double) $orderTotal, 'taxes_enabled' => (int) Configuration::get('PS_TAX')));
     self::$cookie->checkedTOS = '1';
     parent::_assignPayment();
 }
開發者ID:ricardo-rdfs,項目名稱:Portal-BIP,代碼行數:11,代碼來源:OrderController.php

示例4: displayPayment

function displayPayment()
{
    global $smarty, $cart, $currency, $cookie, $orderTotal;
    // Redirect instead of displaying payment modules if any module are grefted on
    Hook::backBeforePayment(strval(Tools::getValue('back')));
    /* We may need to display an order summary */
    $smarty->assign($cart->getSummaryDetails());
    $cookie->checkedTOS = '1';
    $smarty->assign(array('HOOK_PAYMENT' => Module::hookExecPayment(), 'total_price' => floatval($orderTotal), 'taxes_enabled' => intval(Configuration::get('PS_TAX'))));
    Tools::safePostVars();
    include_once dirname(__FILE__) . '/header.php';
    $smarty->display(_PS_THEME_DIR_ . 'order-payment.tpl');
}
開發者ID:vincent,項目名稱:theinvertebrates,代碼行數:13,代碼來源:order.php


注:本文中的Hook::backBeforePayment方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。