本文整理汇总了PHP中available_payment_list函数的典型用法代码示例。如果您正苦于以下问题:PHP available_payment_list函数的具体用法?PHP available_payment_list怎么用?PHP available_payment_list使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了available_payment_list函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: price_format
$goods_list[$key]['goods_price'] = price_format($value['goods_price'], false);
$goods_list[$key]['subtotal'] = price_format($value['subtotal'], false);
}
/* 设置能否修改使用余额数 */
if ($order['order_amount'] > 0) {
if ($order['order_status'] == OS_UNCONFIRMED || $order['order_status'] == OS_CONFIRMED) {
$user = user_info($order['user_id']);
if ($user['user_money'] + $user['credit_line'] > 0) {
$smarty->assign('allow_edit_surplus', 1);
$smarty->assign('max_surplus', sprintf($_LANG['max_surplus'], $user['user_money']));
}
}
}
/* 未发货,未付款时允许更换支付方式 */
if ($order['order_amount'] > 0 && $order['pay_status'] == PS_UNPAYED && $order['shipping_status'] == SS_UNSHIPPED) {
$payment_list = available_payment_list(false, 0, true);
/* 过滤掉当前支付方式和余额支付方式 */
foreach ($payment_list as $key => $payment) {
if ($payment['pay_id'] == $order['pay_id'] || $payment['pay_code'] == 'balance') {
unset($payment_list[$key]);
}
}
$smarty->assign('payment_list', $payment_list);
}
/* 订单 支付 配送 状态语言项 */
$order['order_status'] = $_LANG['os'][$order['order_status']];
$order['pay_status'] = $_LANG['ps'][$order['pay_status']];
$order['shipping_status'] = $_LANG['ss'][$order['shipping_status']];
$smarty->assign('order', $order);
$smarty->assign('goods_list', $goods_list);
$smarty->display('user_transaction.dwt');
示例2: price_format
$shipping_list[$key]['shipping_fee'] = $shipping_fee;
$shipping_list[$key]['format_shipping_fee'] = price_format($shipping_fee);
$shipping_list[$key]['free_money'] = price_format($shipping['configure']['free_money']);
}
$smarty->assign('shipping_list', $shipping_list);
} elseif ('payment' == $step) {
/* 取得可用的支付方式列表 */
if (exist_real_goods($order_id)) {
/* 存在实体商品 */
$region_id_list = array($order['country'], $order['province'], $order['city'], $order['district']);
$shipping_area = shipping_area_info($order['shipping_id'], $region_id_list);
$pay_fee = $shipping_area['support_cod'] == 1 ? $shipping_area['pay_fee'] : 0;
$payment_list = available_payment_list($shipping_area['support_cod'], $pay_fee);
} else {
/* 不存在实体商品 */
$payment_list = available_payment_list(false);
}
/* 过滤掉使用余额支付 */
foreach ($payment_list as $key => $payment) {
if ($payment['pay_code'] == 'balance') {
unset($payment_list[$key]);
}
}
$smarty->assign('payment_list', $payment_list);
} elseif ('other' == $step) {
/* 查询是否存在实体商品 */
$exist_real_goods = exist_real_goods($order_id);
$smarty->assign('exist_real_goods', $exist_real_goods);
if ($exist_real_goods) {
/* 取得包装列表 */
$smarty->assign('pack_list', pack_list());
示例3: action_order_detail
//.........这里部分代码省略.........
break;
}
switch ($back_info['back_type']) {
case '1':
$bt = "退货";
break;
case '3':
$bt = "申请维修";
break;
case '4':
$bt = "退款";
break;
default:
break;
}
$shouhou = $sb . " " . $bt;
} else {
$shouhou = "正常";
}
$goods_list[$key]['shouhou'] = $shouhou;
}
/* 设置能否修改使用余额数 */
if ($order['order_amount'] > 0) {
if ($order['order_status'] == OS_UNCONFIRMED || $order['order_status'] == OS_CONFIRMED) {
$user = user_info($order['user_id']);
if ($user['user_money'] + $user['credit_line'] > 0) {
$smarty->assign('allow_edit_surplus', 1);
$smarty->assign('max_surplus', sprintf($_LANG['max_surplus'], $user['user_money']));
}
}
}
/* 未发货,未付款时允许更换支付方式 */
if ($order['order_amount'] > 0 && $order['pay_status'] == PS_UNPAYED && $order['shipping_status'] == SS_UNSHIPPED) {
$payment_list = available_payment_list(false, 0, true);
/* 过滤掉当前支付方式和余额支付方式 */
if (is_array($payment_list)) {
foreach ($payment_list as $key => $payment) {
if ($payment['pay_id'] == $order['pay_id'] || $payment['pay_code'] == 'balance') {
unset($payment_list[$key]);
}
}
}
$smarty->assign('payment_list', $payment_list);
}
/* 订单 支付 配送 状态语言项 */
$order['order_status'] = $_LANG['os'][$order['order_status']];
$order['pay_status'] = $_LANG['ps'][$order['pay_status']];
$order['shipping_status_id'] = $order['shipping_status'];
// 代码增加 By
// www.68ecshop.com
$order['shipping_status'] = $_LANG['ss'][$order['shipping_status']];
/* 增值税发票_添加_START_www.68ecshop.com */
/* 增值税发票收票地址 */
if ($order['inv_type'] == 'vat_invoice') {
$order['inv_complete_address'] = get_inv_complete_address($order);
}
/* 发票金额 */
$order['formatted_inv_money'] = price_format($order['inv_money']);
/* 增值税发票_添加_END_www.68ecshop.com */
$smarty->assign('order', $order);
/* 代码增加_start By www.68ecshop.com */
$smarty->assign('mobile_phone', $GLOBALS['db']->getOne("select mobile_phone from " . $GLOBALS['ecs']->table('users') . " where user_id='{$_SESSION['user_id']}'"));
foreach ($goods_list as $goods_key => $goods_val) {
$sql_goods = "select count(*) from " . $ecs->table('back_order') . " where order_id='{$order['order_id']}' and goods_id='{$goods_val['goods_id']}'";
$back_order_count = $db->getOne($sql_goods);
$goods_list[$goods_key]['back_can'] = $back_order_count ? '0' : '1';
示例4: shipping_area_info
$cod = false;
$cod_fee = 0;
/* 赋值保证金 */
$smarty->assign('gb_deposit', $group_buy['deposit']);
}
}
if ($cod) {
$shipping_area_info = shipping_area_info($order['shipping_id'], $region);
$cod_fee = $shipping_area_info['pay_fee'];
}
} else {
$cod_fee = 0;
}
}
// 给货到付款的手续费加<span id>,以便改变配送的时候动态显示
$payment_list = available_payment_list(1, $cod_fee);
if (isset($payment_list)) {
foreach ($payment_list as $key => $payment) {
if ($payment['is_cod'] == '1') {
$payment_list[$key]['format_pay_fee'] = '<span id="ECS_CODFEE">' . $payment['format_pay_fee'] . '</span>';
}
/* 如果有易宝神州行支付 如果订单金额大于300 则不显示 */
if ($payment['pay_code'] == 'yeepayszx' && $total['amount'] > 300) {
unset($payment_list[$key]);
}
/* 如果有余额支付 */
if ($payment['pay_code'] == 'balance') {
/* 如果未登录,不显示 */
if ($_SESSION['user_id'] == 0) {
unset($payment_list[$key]);
} else {
示例5: checkout
//.........这里部分代码省略.........
{
show_message('error group_buy_id');
}
$group_buy = group_buy_info($group_buy_id);
if (empty($group_buy))
{
show_message('group buy not exists: ' . $group_buy_id);
}
if ($group_buy['deposit'] > 0)
{
$cod = false;
$cod_fee = 0;
#赋值保证金
$smarty->assign('gb_deposit', $group_buy['deposit']);
}
}
if ($cod)
{
$shipping_area_info = shipping_area_info($order['shipping_id'], $region);
$cod_fee = $shipping_area_info['pay_fee'];
}
}
else
{
$cod_fee = 0;
}
}
# 给货到付款的手续费加<span id>,以便改变配送的时候动态显示
$payment_list = available_payment_list(1, $cod_fee);
if(isset($payment_list))
{
foreach ($payment_list as $key => $payment)
{
if ($payment['is_cod'] == '1')
{
$payment_list[$key]['format_pay_fee'] = '<span id="ECS_CODFEE">' . $payment['format_pay_fee'] . '</span>';
}
#如果有易宝神州行支付 如果订单金额大于300 则不显示
if ($payment['pay_code'] == 'yeepayszx' && $total['amount'] > 300)
{
unset($payment_list[$key]);
}
#如果有余额支付
if ($payment['pay_code'] == 'balance')
{
#如果未登录,不显示
if ($_SESSION['user_id'] == 0)
{
unset($payment_list[$key]);
}
else
{
if ($_SESSION['flow_order']['pay_id'] == $payment['pay_id'])
{
$smarty->assign('disable_surplus', 1);
}
}
}
}
}
示例6: action_order_detail
function action_order_detail()
{
$user = $GLOBALS['user'];
$_CFG = $GLOBALS['_CFG'];
$_LANG = $GLOBALS['_LANG'];
$smarty = $GLOBALS['smarty'];
$db = $GLOBALS['db'];
$ecs = $GLOBALS['ecs'];
$user_id = $GLOBALS['user_id'];
include_once ROOT_PATH . 'includes/lib_transaction.php';
include_once ROOT_PATH . 'includes/lib_payment.php';
include_once ROOT_PATH . 'includes/lib_order.php';
include_once ROOT_PATH . 'includes/lib_clips.php';
include_once ROOT_PATH . 'kuaidi/kuaidi.php';
$order_id = isset($_GET['order_id']) ? intval($_GET['order_id']) : 0;
/* 订单详情 */
$order = get_order_detail($order_id, $user_id);
if ($order === false) {
$GLOBALS['err']->show($_LANG['back_home_lnk'], './');
exit;
}
/* 是否显示添加到购物车 */
if ($order['extension_code'] != 'group_buy' && $order['extension_code'] != 'exchange_goods') {
$smarty->assign('allow_to_cart', 1);
}
/* 订单商品 */
$goods_list = order_goods($order_id);
foreach ($goods_list as $key => $value) {
$goods_list[$key]['market_price'] = price_format($value['market_price'], false);
$goods_list[$key]['goods_price'] = price_format($value['goods_price'], false);
$goods_list[$key]['subtotal'] = price_format($value['subtotal'], false);
}
/* 设置能否修改使用余额数 */
if ($order['order_amount'] > 0) {
if ($order['order_status'] == OS_UNCONFIRMED || $order['order_status'] == OS_CONFIRMED) {
$user = user_info($order['user_id']);
if ($user['user_money'] + $user['credit_line'] > 0) {
$smarty->assign('allow_edit_surplus', 1);
$smarty->assign('max_surplus', sprintf($_LANG['max_surplus'], $user['user_money']));
}
}
}
/* 未发货,未付款时允许更换支付方式 */
if ($order['order_amount'] > 0 && $order['pay_status'] == PS_UNPAYED && $order['shipping_status'] == SS_UNSHIPPED) {
$payment_list = available_payment_list(false, 0, true);
/* 过滤掉当前支付方式和余额支付方式 */
if (is_array($payment_list)) {
foreach ($payment_list as $key => $payment) {
if ($payment['pay_id'] == $order['pay_id'] || $payment['pay_code'] == 'balance') {
unset($payment_list[$key]);
}
}
}
$smarty->assign('payment_list', $payment_list);
}
/* 订单 支付 配送 状态语言项 */
$order['order_status'] = $_LANG['os'][$order['order_status']];
$order['pay_status'] = $_LANG['ps'][$order['pay_status']];
$order['shipping_status'] = $_LANG['ss'][$order['shipping_status']];
//快递跟踪
$kuaidi = new Express();
$result = $kuaidi->getorder($order['shipping_name'], $order['invoice']);
$smarty->assign('kuaidi', $result['data'][0]);
$smarty->assign('order', $order);
$smarty->assign('goods_list', $goods_list);
$smarty->display('user_transaction.dwt');
}
示例7: shipping_area_info
$cod = false;
$cod_fee = 0;
/* 赋值保证金 */
$smarty->assign('gb_deposit', $group_buy['deposit']);
}
}
if ($cod) {
$shipping_area_info = shipping_area_info($order['shipping_id'], $region);
$cod_fee = $shipping_area_info['pay_fee'];
}
} else {
$cod_fee = 0;
}
}
// 给货到付款的手续费加<span id>,以便改变配送的时候动态显示
$payment_list = available_payment_list(1, $cod_fee, false, $_SESSION['extension_code'] == 'virtual_good' ? 1 : 0);
if (isset($payment_list)) {
foreach ($payment_list as $key => $payment) {
if ($payment['is_cod'] == '1') {
$payment_list[$key]['format_pay_fee'] = '<span id="ECS_CODFEE">' . $payment['format_pay_fee'] . '</span>';
}
/* 如果有易宝神州行支付 如果订单金额大于300 则不显示 */
if ($payment['pay_code'] == 'yeepayszx' && $total['amount'] > 300) {
unset($payment_list[$key]);
}
/* 如果有余额支付 */
if ($payment['pay_code'] == 'balance') {
/* 如果未登录,不显示 */
if ($_SESSION['user_id'] == 0) {
unset($payment_list[$key]);
} else {
示例8: user_bonus
$user_bonus = user_bonus($_SESSION['user_id'], $total['goods_price']);
if (!empty($user_bonus)) {
foreach ($user_bonus as &$val) {
$val['bonus_money_formated'] = price_format($val['type_money'], false);
}
$smarty->assign('bonus_list', $user_bonus);
//默认使用第一个红包,重新计算费用
$order['bonus_id'] = $user_bonus[0]['bonus_id'];
$order['bonus'] = $user_bonus[0]['amount'];
$total = order_fee($order, $cart_goods, $consignee);
}
// 能使用红包
$smarty->assign('allow_use_bonus', 1);
}
// 取得支付列表
$payment_list = available_payment_list(false, $cod_fee, true, is_wechat_browser());
if (!empty($payment_list)) {
$smarty->assign('default_payment', $payment_list[0]['pay_id']);
foreach ($payment_list as $key => $payment) {
if ($payment['is_cod'] == '1') {
$payment_list[$key]['format_pay_fee'] = '<span id="ECS_CODFEE">' . $payment['format_pay_fee'] . '</span>';
}
// 如果有余额支付
if ($payment['pay_code'] == 'balance') {
// 如果未登录,不显示
if ($_SESSION['user_id'] == 0) {
unset($payment_list[$key]);
} else {
if ($_SESSION['flow_order']['pay_id'] == $payment['pay_id']) {
$smarty->assign('disable_surplus', 1);
}