本文整理汇总了PHP中order::hasPaymentDue方法的典型用法代码示例。如果您正苦于以下问题:PHP order::hasPaymentDue方法的具体用法?PHP order::hasPaymentDue怎么用?PHP order::hasPaymentDue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类order
的用法示例。
在下文中一共展示了order::hasPaymentDue方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: order
}
if (DISPLAY_CONDITIONS_ON_CHECKOUT == 'true') {
if (!isset($_POST['conditions']) || $_POST['conditions'] != '1') {
$messageStack->add_session('checkout_payment', ERROR_CONDITIONS_NOT_ACCEPTED, 'error');
}
}
require_once BITCOMMERCE_PKG_PATH . 'classes/CommerceOrder.php';
$order = new order();
require_once DIR_FS_CLASSES . 'order_total.php';
$order_total_modules = new order_total();
$order_total_modules->collect_posts();
// load the selected payment module
require_once BITCOMMERCE_PKG_PATH . 'classes/CommercePaymentManager.php';
$paymentManager = new CommercePaymentManager($_SESSION['payment']);
$paymentManager->update_status($_REQUEST);
if ($order->hasPaymentDue() && is_array($paymentManager->modules) && sizeof($paymentManager->modules) > 1 && (empty(${$_SESSION}['payment']) || !is_object(${$_SESSION}['payment']))) {
$messageStack->add_session('checkout_payment', ERROR_NO_PAYMENT_MODULE_SELECTED, 'error');
}
if ($messageStack->size('checkout_payment') > 0) {
zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, '', 'SSL'));
}
//echo $messageStack->size('checkout_payment');
//die('here');
if (is_array($paymentManager->modules)) {
if (!$paymentManager->verifyPayment($_REQUEST, $order)) {
zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, NULL, 'SSL', true, false));
}
}
// load the selected shipping module
require BITCOMMERCE_PKG_PATH . 'classes/CommerceShipping.php';
$shipping_modules = new CommerceShipping($_SESSION['shipping']);
示例2: CommercePaymentManager
// zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT,'','SSL'));
}
// load selected payment module
require BITCOMMERCE_PKG_PATH . 'classes/CommercePaymentManager.php';
$paymentManager = new CommercePaymentManager($_SESSION['payment']);
// load the selected shipping module
require BITCOMMERCE_PKG_PATH . 'classes/CommerceShipping.php';
$shipping_modules = new CommerceShipping($_SESSION['shipping']);
require BITCOMMERCE_PKG_PATH . 'classes/CommerceOrder.php';
$order = new order();
require DIR_FS_CLASSES . 'order_total.php';
$order_total_modules = new order_total();
$order_totals = $order_total_modules->process($_REQUEST);
$gBitDb->mDb->StartTrans();
// load the before_process function from the payment modules
if ($order->hasPaymentDue() && !$paymentManager->processPayment($_REQUEST, $order)) {
zen_redirect(zen_href_link(FILENAME_CHECKOUT_PAYMENT, NULL, 'SSL', true, false));
}
$newOrderId = $order->create($order_totals, 2);
$order->create_add_products($newOrderId);
$paymentManager->after_order_create($newOrderId);
$order->send_order_email($newOrderId);
$gBitDb->mDb->completeTrans();
$paymentManager->after_process();
$gBitCustomer->mCart->reset(true);
// unregister session variables used during checkout
foreach (array('sendto', 'billto', 'shipping', 'payment', 'comments') as $key) {
if (isset($_SESSION[$key])) {
unset($_SESSION[$key]);
}
}