本文整理汇总了PHP中get_online_payment_list函数的典型用法代码示例。如果您正苦于以下问题:PHP get_online_payment_list函数的具体用法?PHP get_online_payment_list怎么用?PHP get_online_payment_list使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了get_online_payment_list函数的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。
示例1: action_pay
function action_pay()
{
$user = $GLOBALS['user'];
$_CFG = $GLOBALS['_CFG'];
$_LANG = $GLOBALS['_LANG'];
$smarty = $GLOBALS['smarty'];
$db = $GLOBALS['db'];
$ecs = $GLOBALS['ecs'];
$user_id = $_SESSION['user_id'];
include_once ROOT_PATH . 'includes/lib_clips.php';
include_once ROOT_PATH . 'includes/lib_payment.php';
include_once ROOT_PATH . 'includes/lib_order.php';
// 变量初始化
$surplus_id = isset($_GET['id']) ? intval($_GET['id']) : 0;
$payment_id = isset($_GET['pid']) ? intval($_GET['pid']) : 0;
if ($surplus_id == 0) {
ecs_header("Location: user.php?act=account_log\n");
exit;
}
// 如果原来的支付方式已禁用或者已删除, 重新选择支付方式
if ($payment_id == 0) {
ecs_header("Location: user.php?act=account_deposit&id=" . $surplus_id . "\n");
exit;
}
// 获取单条会员帐目信息
$order = array();
$order = get_surplus_info($surplus_id);
// 支付方式的信息
$payment_info = array();
$payment_info = payment_info($payment_id);
/* 如果当前支付方式没有被禁用,进行支付的操作 */
if (!empty($payment_info)) {
// 取得支付信息,生成支付代码
$payment = unserialize_config($payment_info['pay_config']);
// 生成伪订单号
$order['order_sn'] = $surplus_id;
// 获取需要支付的log_id
$order['log_id'] = get_paylog_id($surplus_id, $pay_type = PAY_SURPLUS);
$order['user_name'] = $_SESSION['user_name'];
$order['surplus_amount'] = $order['amount'];
// 计算支付手续费用
$payment_info['pay_fee'] = pay_fee($payment_id, $order['surplus_amount'], 0);
// 计算此次预付款需要支付的总金额
$order['order_amount'] = $order['surplus_amount'] + $payment_info['pay_fee'];
// 如果支付费用改变了,也要相应的更改pay_log表的order_amount
$order_amount = $db->getOne("SELECT order_amount FROM " . $ecs->table('pay_log') . " WHERE log_id = '{$order['log_id']}'");
if ($order_amount != $order['order_amount']) {
$db->query("UPDATE " . $ecs->table('pay_log') . " SET order_amount = '{$order['order_amount']}' WHERE log_id = '{$order['log_id']}'");
}
/* 调用相应的支付方式文件 */
include_once ROOT_PATH . 'includes/modules/payment/' . $payment_info['pay_code'] . '.php';
/* 取得在线支付方式的支付按钮 */
$pay_obj = new $payment_info['pay_code']();
$payment_info['pay_button'] = $pay_obj->get_code($order, $payment);
/* 模板赋值 */
$smarty->assign('payment', $payment_info);
$smarty->assign('order', $order);
$smarty->assign('pay_fee', price_format($payment_info['pay_fee'], false));
$smarty->assign('amount', price_format($order['surplus_amount'], false));
$smarty->assign('action', 'act_account');
$smarty->display('user_transaction.dwt');
} else {
include_once ROOT_PATH . 'includes/lib_clips.php';
$smarty->assign('payment', get_online_payment_list());
$smarty->assign('order', $order);
$smarty->assign('action', 'account_deposit');
$smarty->display('user_transaction.dwt');
}
}
开发者ID:seanguo166,项目名称:yinoos,代码行数:69,代码来源:user.php
示例2: price_format
}
/* 调用相应的支付方式文件 */
include_once ROOT_PATH . 'includes/modules/payment/' . $payment_info['pay_code'] . '.php';
/* 取得在线支付方式的支付按钮 */
$pay_obj = new $payment_info['pay_code']();
$payment_info['pay_button'] = $pay_obj->get_code($order, $payment);
/* 模板赋值 */
$smarty->assign('payment', $payment_info);
$smarty->assign('order', $order);
$smarty->assign('pay_fee', price_format($payment_info['pay_fee'], false));
$smarty->assign('amount', price_format($order['surplus_amount'], false));
$smarty->assign('action', 'act_account');
$smarty->display('user_transaction.dwt');
} else {
include_once ROOT_PATH . 'includes/lib_clips.php';
$smarty->assign('payment', get_online_payment_list());
$smarty->assign('order', $order);
$smarty->assign('action', 'account_deposit');
$smarty->display('user_transaction.dwt');
}
} elseif ($action == 'add_tag') {
include_once 'includes/cls_json.php';
include_once 'includes/lib_clips.php';
$result = array('error' => 0, 'message' => '', 'content' => '');
$id = isset($_POST['id']) ? intval($_POST['id']) : 0;
$tag = isset($_POST['tag']) ? json_str_iconv(trim($_POST['tag'])) : '';
if ($user_id == 0) {
/* 用户没有登录 */
$result['error'] = 1;
$result['message'] = $_LANG['tag_anonymous'];
} else {
开发者ID:BGCX261,项目名称:zishashop-svn-to-git,代码行数:31,代码来源:user.php
示例3: deposit
/**
* 余额充值
*/
public function deposit()
{
$memberinfo = $this->memberinfo;
$payment = get_online_payment_list();
$show_validator = 1;
include template('member', 'deposit');
}
开发者ID:hubs,项目名称:yuncms,代码行数:10,代码来源:IndexController.php
注:本文中的get_online_payment_list函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论