• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP get_paylog_id函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中get_paylog_id函数的典型用法代码示例。如果您正苦于以下问题:PHP get_paylog_id函数的具体用法?PHP get_paylog_id怎么用?PHP get_paylog_id使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了get_paylog_id函数的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: get_order_detail

/**
 *  获取指订单的详情
 *
 * @access  public
 * @param   int         $order_id       订单ID
 * @param   int         $user_id        用户ID
 *
 * @return   arr        $order          订单所有信息的数组
 */
function get_order_detail($order_id, $user_id = 0)
{
    include_once ROOT_PATH . 'includes/lib_order.php';
    $order_id = intval($order_id);
    if ($order_id <= 0) {
        $GLOBALS['err']->add(L('invalid_order_id'));
        return false;
    }
    $order = order_info($order_id);
    //检查订单是否属于该用户
    if ($user_id > 0 && $user_id != $order['user_id']) {
        $GLOBALS['err']->add(L('no_priv'));
        return false;
    }
    /* 对发货号处理 */
    if (!empty($order['invoice_no'])) {
        $shipping_code = $GLOBALS['db']->GetOne("SELECT shipping_code FROM " . $GLOBALS['ecs']->table('shipping') . " WHERE shipping_id = '{$order['shipping_id']}'");
        $plugin = ROOT_PATH . 'includes/modules/shipping/' . $shipping_code . '.php';
        if (file_exists($plugin)) {
            include_once $plugin;
            $shipping = new $shipping_code();
            $order['invoice_no'] = $shipping->query($order['invoice_no']);
        }
    }
    /* 只有未确认才允许用户修改订单地址 */
    if ($order['order_status'] == OS_UNCONFIRMED) {
        $order['allow_update_address'] = 1;
        //允许修改收货地址
    } else {
        $order['allow_update_address'] = 0;
    }
    /* 获取订单中实体商品数量 */
    $order['exist_real_goods'] = exist_real_goods($order_id);
    /* 如果是未付款状态,生成支付按钮 */
    if ($order['pay_status'] == PS_UNPAYED && ($order['order_status'] == OS_UNCONFIRMED || $order['order_status'] == OS_CONFIRMED)) {
        /*
         * 在线支付按钮
         */
        //支付方式信息
        $payment_info = array();
        $payment_info = payment_info($order['pay_id']);
        //无效支付方式
        if ($payment_info === false) {
            $order['pay_online'] = '';
        } else {
            //取得支付信息,生成支付代码
            $payment = unserialize_config($payment_info['pay_config']);
            //获取需要支付的log_id
            $order['log_id'] = get_paylog_id($order['order_id'], $pay_type = PAY_ORDER);
            $order['user_name'] = $_SESSION['user_name'];
            $order['pay_desc'] = $payment_info['pay_desc'];
            /* 调用相应的支付方式文件 */
            include_once ROOT_PATH . 'includes/modules/payment/' . $payment_info['pay_code'] . '.php';
            /* 取得在线支付方式的支付按钮 */
            $pay_obj = new $payment_info['pay_code']();
            $order['pay_online'] = $pay_obj->get_code($order, $payment);
        }
    } else {
        $order['pay_online'] = '';
    }
    /* 无配送时的处理 */
    $order['shipping_id'] == -1 and $order['shipping_name'] = L('shipping_not_need');
    /* 其他信息初始化 */
    $order['how_oos_name'] = $order['how_oos'];
    $order['how_surplus_name'] = $order['how_surplus'];
    /* 虚拟商品付款后处理 */
    if ($order['pay_status'] != PS_UNPAYED) {
        /* 取得已发货的虚拟商品信息 */
        $virtual_goods = get_virtual_goods($order_id, true);
        $virtual_card = array();
        foreach ($virtual_goods as $code => $goods_list) {
            /* 只处理虚拟卡 */
            if ($code == 'virtual_card') {
                foreach ($goods_list as $goods) {
                    if ($info = virtual_card_result($order['order_sn'], $goods)) {
                        $virtual_card[] = array('goods_id' => $goods['goods_id'], 'goods_name' => $goods['goods_name'], 'info' => $info);
                    }
                }
            }
            /* 处理超值礼包里面的虚拟卡 */
            if ($code == 'package_buy') {
                foreach ($goods_list as $goods) {
                    $sql = 'SELECT g.goods_id FROM ' . $GLOBALS['ecs']->table('package_goods') . ' AS pg, ' . $GLOBALS['ecs']->table('goods') . ' AS g ' . "WHERE pg.goods_id = g.goods_id AND pg.package_id = '" . $goods['goods_id'] . "' AND extension_code = 'virtual_card'";
                    $vcard_arr = $GLOBALS['db']->getAll($sql);
                    foreach ($vcard_arr as $val) {
                        if ($info = virtual_card_result($order['order_sn'], $val)) {
                            $virtual_card[] = array('goods_id' => $goods['goods_id'], 'goods_name' => $goods['goods_name'], 'info' => $info);
                        }
                    }
                }
            }
//.........这里部分代码省略.........
开发者ID:connwap135,项目名称:ectouch,代码行数:101,代码来源:transaction_helper.php


示例2: array

     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']();
开发者ID:BGCX261,项目名称:zishashop-svn-to-git,代码行数:31,代码来源:user.php


示例3: UnifiedOrder_pub

//=========步骤2:使用统一支付接口,获取prepay_id============
//使用统一支付接口
$unifiedOrder = new UnifiedOrder_pub();
//获取订单信息并且判断订单是否是该用户的
$order_sn = $_GET['id'];
$order_sn = trim($order_sn);
$order_info = query1("select * from qygsp_order_info where order_sn = '{$order_sn}' limit 1");
if (!$order_info) {
    exit('error');
} else {
    $order_info = $order_info[0];
}
if ($order_info['user_id'] != $_SESSION['common_user_id']) {
    exit('error 2');
}
$order_info['log_id'] = get_paylog_id($order_info['order_id'], $pay_type = PAY_ORDER);
//商户订单号
//
$out_trade_no = $order_info['log_id'];
//设置统一支付接口参数
//设置必填参数
//appid已填,商户无需重复填写
//mch_id已填,商户无需重复填写
//noncestr已填,商户无需重复填写
//spbill_create_ip已填,商户无需重复填写
//sign已填,商户无需重复填写
$unifiedOrder->setParameter("openid", $openid);
//
//商品描述是订单中第一个商品的名字
$order_id = $order_info['order_id'];
$description = myorder::get_order_desc($order_id);
开发者ID:lughong,项目名称:test,代码行数:31,代码来源:js_api_call+-+副本.php


示例4: 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


示例5: get_user_orders_ex

function get_user_orders_ex($user_id, $num = 10, $start = 0, $ext = null)
{
    global $_CFG;
    /*判断组团的状态*/
    $sql = "select * from " . $GLOBALS['hhs']->table('order_info') . " where user_id='{$user_id}' limit " . $start . "," . $num;
    $orders = $GLOBALS['db']->getAll($sql);
    if (!empty($orders)) {
        foreach ($orders as $v) {
            if ($v['extension_code'] == 'team_goods' && $v['team_status'] == 1) {
                $sql = "select pay_time from " . $GLOBALS['hhs']->table('order_info') . " where order_id=" . $v['team_sign'];
                $pay_time = $GLOBALS['db']->getOne($sql);
                if ($pay_time + $_CFG['team_suc_time'] * 24 * 3600 < gmtime()) {
                    //取消订单
                    $sql = "update " . $GLOBALS['hhs']->table('order_info') . " set team_status=3,order_status=2 where team_status=1 and team_sign=" . $v['team_sign'];
                    $GLOBALS['db']->query($sql);
                    $sql = "UPDATE " . $GLOBALS['hhs']->table('order_info') . " SET order_status=2 WHERE team_status=0 and team_sign=" . $v['team_sign'];
                    $GLOBALS['db']->query($sql);
                }
            }
        }
    }
    include_once ROOT_PATH . 'includes/lib_order.php';
    /* 取得订单列表 */
    $arr = array();
    $sql = "SELECT order_id,share_pay_type, order_sn, order_status, shipping_status, pay_status,pay_id, add_time,order_amount, shipping_name,shipping_id,invoice_no, " . "(goods_amount + shipping_fee + insure_fee + pay_fee + pack_fee + card_fee + tax - discount) AS total_fee,extension_code,extension_id,team_sign,team_first,team_status " . " FROM " . $GLOBALS['hhs']->table('order_info') . " WHERE user_id = '{$user_id}' " . $ext . " ORDER BY add_time DESC";
    $res = $GLOBALS['db']->SelectLimit($sql, $num, $start);
    while ($row = $GLOBALS['db']->fetchRow($res)) {
        if ($row['order_status'] == OS_UNCONFIRMED) {
            $row['handler'] = "<a href=\"user.php?act=cancel_order&order_id=" . $row['order_id'] . "\" onclick=\"if (!confirm('" . $GLOBALS['_LANG']['confirm_cancel'] . "')) return false;\">" . $GLOBALS['_LANG']['cancel'] . "</a>";
        } else {
            if ($row['order_status'] == OS_SPLITED) {
                /* 对配送状态的处理 */
                if ($row['shipping_status'] == SS_SHIPPED) {
                    @($row['handler'] = "<a href=\"javascript:void(0);\" onclick='get_invoice(\"" . $row['shipping_name'] . "\",\"" . $row['invoice_no'] . "\");'>查看物流</a>");
                    @($row['handler'] .= "<a href=\"user.php?act=affirm_received&order_id=" . $row['order_id'] . "\" onclick=\"if (!confirm('" . $GLOBALS['_LANG']['confirm_received'] . "')) return false;\">" . $GLOBALS['_LANG']['received'] . "</a>");
                } elseif ($row['shipping_status'] == SS_RECEIVED) {
                    //@$row['handler'] = '<span style="color:red">'.$GLOBALS['_LANG']['ss_received'] .'</span>';
                } else {
                    if ($row['pay_status'] == PS_UNPAYED) {
                        //@$row['handler'] = "<a href=\"user.php?act=order_detail&order_id=" .$row['order_id']. '">' .$GLOBALS['_LANG']['pay_money']. '</a>';
                    } else {
                        //@$row['handler'] = "<a href=\"user.php?act=order_detail&order_id=" .$row['order_id']. '">' .$GLOBALS['_LANG']['view_order']. '</a>';
                    }
                }
            } else {
                //$row['handler'] = '<span style="color:red">'.$GLOBALS['_LANG']['os'][$row['order_status']] .'</span>';
            }
        }
        $pay_online = '';
        if ($row['share_pay_type'] > 0 && $row['pay_status'] == PS_UNPAYED) {
            $pay_online = "<a class='state_btn_2' href='share_pay.php?id=" . $row['order_id'] . "'>代付</a>";
        }
        if ($row['share_pay_type'] == 0 && $row['pay_status'] == PS_UNPAYED && ($row['order_status'] == OS_UNCONFIRMED || $row['order_status'] == OS_CONFIRMED)) {
            $payment_info = array();
            $payment_info = payment_info($row['pay_id']);
            //无效支付方式
            if ($payment_info === false) {
                $row['pay_online'] = '';
            } else {
                if ($payment_info['pay_code'] == 'cod') {
                    $payment_info = $GLOBALS['db']->getRow("select * from " . $GLOBALS['hhs']->table("payment") . " where pay_code='wxpay' AND enabled = 1");
                }
                //取得支付信息,生成支付代码
                $payment = unserialize_config($payment_info['pay_config']);
                //获取需要支付的log_id
                $row['log_id'] = get_paylog_id($row['order_id'], $pay_type = PAY_ORDER);
                $row['user_name'] = $_SESSION['user_name'];
                $row['pay_desc'] = $payment_info['pay_desc'];
                if ($row['extension_id']) {
                    $sql = "select goods_name from " . $GLOBALS['hhs']->table('goods') . " where goods_id=" . $row['extension_id'];
                    $row['goods_name'] = $GLOBALS['db']->getOne($sql);
                }
                /* 调用相应的支付方式文件 */
                include_once ROOT_PATH . 'includes/modules/payment/' . $payment_info['pay_code'] . '.php';
                if ($row['order_amount'] > 0) {
                    if ($payment_info['pay_code'] != 'alipay') {
                        /* 调用相应的支付方式文件 */
                        include_once ROOT_PATH . 'includes/modules/payment/' . $payment_info['pay_code'] . '.php';
                        /* 取得在线支付方式的支付按钮 */
                        $pay_obj = new $payment_info['pay_code']();
                        $pay_online = $pay_obj->get_code($row, $payment);
                    } else {
                        $pay_online = '<a class="state_btn_2" href="toalipay.php?order_id=' . $row['order_id'] . '"   >支付宝支付</a>';
                    }
                }
            }
        }
        $row['handler'] = $pay_online . $row['handler'];
        $row['shipping_status'] = $row['shipping_status'] == SS_SHIPPED_ING ? SS_PREPARING : $row['shipping_status'];
        /*
                if($row['order_status']==2){
                    $row['order_status'] =  $GLOBALS['_LANG']['os'][$row['order_status']] ;
                }else{
                    if($row['pay_status']==0){
                        $row['order_status'] = $GLOBALS['_LANG']['ps'][$row['pay_status']];
                    }else{
                        $row['order_status'] =  $GLOBALS['_LANG']['ss'][$row['shipping_status']];// $GLOBALS['_LANG']['ps'][$row['pay_status']] . ',' .
                    } 
                }*/
        $row['order_status'] = $GLOBALS['_LANG']['ps'][$row['pay_status']] . ',' . $GLOBALS['_LANG']['ss'][$row['shipping_status']];
//.........这里部分代码省略.........
开发者ID:shiruolin,项目名称:hzzshop,代码行数:101,代码来源:lib_return.php



注:本文中的get_paylog_id函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP get_payment函数代码示例发布时间:2022-05-15
下一篇:
PHP get_patient_by_id函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap