Ejemplo n.º 1
0
/**
 * 响应操作
*/
function respond()
{
    $payment = get_payment_info('chinabank');
    $v_oid = trim($_POST['v_oid']);
    $v_pmode = trim($_POST['v_pmode']);
    $v_pstatus = trim($_POST['v_pstatus']);
    $v_pstring = trim($_POST['v_pstring']);
    $v_amount = trim($_POST['v_amount']);
    $v_moneytype = trim($_POST['v_moneytype']);
    $remark1 = trim($_POST['remark1']);
    $remark2 = trim($_POST['remark2']);
    $v_md5str = trim($_POST['v_md5str']);
    /**
    * 重新计算md5的值
    */
    $key = $payment['ytauthkey'];
    $md5string = strtoupper(md5($v_oid . $v_pstatus . $v_amount . $v_moneytype . $key));
    /* 检查秘钥是否正确 */
    if ($v_md5str == $md5string) {
        if ($v_pstatus == '20') {
            /* 改变订单状态 */
            if (!order_paid($v_oid)) {
                return false;
            }
            return true;
        }
    } else {
        return false;
    }
}
Ejemplo n.º 2
0
/**
 * 响应操作
*/
function respond()
{
    $payment = get_payment_info('alipay');
    $partner = trim($payment['partnerid']);
    $key = trim($payment['ytauthkey']);
    $sign_type = "MD5";
    $_input_charset = "GBK";
    $transport = "http";
    $alipay = new alipay_notify($partner, $key, $sign_type, $_input_charset, $transport);
    $verify_result = $alipay->return_verify();
    if ($verify_result) {
        //验证成功
        $dingdan = $_GET['out_trade_no'];
        //获取订单号
        $total_fee = $_GET['total_fee'];
        //获取总价格
        return order_paid($dingdan);
    } else {
        return false;
    }
}
Ejemplo n.º 3
0
/**
 * 响应操作
*/
function respond()
{
    $payment = get_payment_info('tenpay');
    $key = $payment['ytauthkey'];
    /* 创建支付应答对象 */
    $resHandler = new PayResponseHandler();
    $resHandler->setKey($key);
    if ($resHandler->isTenpaySign()) {
        //商户单号
        $sp_billno = $resHandler->getParameter("sp_billno");
        //财付通交易单号
        $transaction_id = $resHandler->getParameter("transaction_id");
        //金额,以分为单位
        $total_fee = $resHandler->getParameter("total_fee");
        $pay_result = $resHandler->getParameter("pay_result");
        if ("0" == $pay_result) {
            return order_paid($sp_billno);
        } else {
            return false;
        }
    } else {
        return false;
    }
}
Ejemplo n.º 4
0
function order_paid($v_oid)
{
    global $db, $timestamp, $_CFG;
    $order = $db->getone("select * from " . table('order') . " WHERE oid ='{$v_oid}' AND is_paid= '1' LIMIT 1 ");
    if ($order) {
        $user = get_user($order['uid']);
        $sql = "UPDATE " . table('order') . " SET is_paid= '2',payment_time='{$timestamp}' WHERE oid='{$v_oid}' LIMIT 1 ";
        if (!$db->query($sql)) {
            return false;
        }
        if ($order['amount'] == '0.00') {
            $ismoney = 1;
        } else {
            $ismoney = 2;
        }
        if ($order['points'] > 0) {
            report_deal($order['uid'], 1, $order['points']);
            $user_points = get_user_points($order['uid']);
            $notes = "操作人:{$_SESSION['admin_name']},说明:确认收款。收款金额:{$order['amount']} 。" . date('Y-m-d H:i', time()) . "通过:" . get_payment_info($order['payment_name'], true) . " 成功充值 " . $order['amount'] . "元,(+{$order['points']}),(剩余:{$user_points}),订单:{$v_oid}";
            write_memberslog($order['uid'], 4, 9101, $user['username'], $notes);
            write_setmeallog($order['uid'], $user['username'], $notes, 4, $order['amount'], $ismoney, 1, 4);
        }
        if ($order['setmeal'] > 0) {
            set_members_setmeal($order['uid'], $order['setmeal']);
            $setmeal = get_setmeal_one($order['setmeal']);
            $notes = "操作人:{$_SESSION['admin_name']},说明:确认收款,收款金额:{$order['amount']} 。" . date('Y-m-d H:i', time()) . "通过:" . get_payment_info($order['payment_name'], true) . " 成功充值 " . $order['amount'] . "元并开通{$setmeal['setmeal_name']}";
            write_memberslog($order['uid'], 4, 9102, $user['username'], $notes);
            write_setmeallog($order['uid'], $user['username'], $notes, 4, $order['amount'], $ismoney, 2, 4);
        }
        //发送邮件
        $mailconfig = get_cache('mailconfig');
        if ($mailconfig['set_payment'] == "1" && $user['email_audit'] == "1") {
            dfopen($_CFG['site_domain'] . $_CFG['site_dir'] . "plus/asyn_mail.php?uid=" . $order['uid'] . "&key=" . asyn_userkey($order['uid']) . "&act=set_payment");
        }
        //发送邮件完毕
        //sms
        $sms = get_cache('sms_config');
        if ($sms['open'] == "1" && $sms['set_payment'] == "1" && $user['mobile_audit'] == "1") {
            dfopen($_CFG['site_domain'] . $_CFG['site_dir'] . "plus/asyn_sms.php?uid=" . $order['uid'] . "&key=" . asyn_userkey($order['uid']) . "&act=set_payment");
        }
        //sms
        write_log("将订单号为" . $v_oid . "的订单设置为确认收款", $_SESSION['admin_name'], 3);
        return true;
    }
    return true;
}
Ejemplo n.º 5
0
function get_sms_order_all($offset, $perpage, $get_sql = '')
{
    global $db;
    $row_arr = array();
    if (isset($offset) && !empty($perpage)) {
        $limit = " LIMIT " . $offset . ',' . $perpage;
    }
    $result = $db->query("SELECT * FROM " . table('order') . " " . $get_sql . " ORDER BY id DESC " . $limit);
    while ($row = $db->fetch_array($result)) {
        if ($row['is_paid'] == "0") {
            $row['payment_name'] = get_payment_info($row['payment_name'], true);
        }
        if ($row['is_paid'] == "1") {
            $row['amount'] = intval($row['amount']);
        }
        $row_arr[] = $row;
    }
    return $row_arr;
}
Ejemplo n.º 6
0
 if (empty($hunter_profile['huntername'])) {
     $link[0]['text'] = "填写猎头资料";
     $link[0]['href'] = 'hunter_info.php?act=hunter_profile';
     showmsg("请先填写您的猎头资料!", 1, $link);
 }
 $myorder = get_user_order($_SESSION['uid'], 1);
 $myorder = count($myorder);
 if ($myorder >= 5) {
     $link[0]['text'] = "立即查看";
     $link[0]['href'] = '?act=order_list&is_paid=1';
     showmsg("未处理的订单不能超过 5 条,请先处理后再次申请!", 1, $link, true, 8);
 }
 $setmeal = get_setmeal_one($_POST['setmealid']);
 if ($setmeal && $setmeal['apply'] == "1") {
     $payment_name = empty($_POST['payment_name']) ? showmsg("请选择付款方式!", 1) : $_POST['payment_name'];
     $paymenttpye = get_payment_info($payment_name);
     if (empty($paymenttpye)) {
         showmsg("支付方式错误!", 0);
     }
     $fee = number_format($setmeal['expense'] / 100 * $paymenttpye['fee'], 1, '.', '');
     //手续费
     $order['oid'] = strtoupper(substr($paymenttpye['typename'], 0, 1)) . "-" . date('ymd', time()) . "-" . date('His', time());
     //订单号
     $order['v_url'] = $_CFG['site_domain'] . $_CFG['site_dir'] . "include/payment/respond_" . $paymenttpye['typename'] . ".php";
     $order['v_amount'] = $setmeal['expense'] + $fee;
     //金额
     $order_id = add_order($_SESSION['uid'], $order['oid'], $setmeal['expense'], $payment_name, "开通服务:" . $setmeal['setmeal_name'], $timestamp, "", $setmeal['id'], 3, 1);
     if ($order_id) {
         if ($order['v_amount'] == 0) {
             if (order_paid($order['oid'])) {
                 $link[0]['text'] = "查看订单";
Ejemplo n.º 7
0
function order_paid($v_oid)
{
    global $db, $timestamp, $_CFG;
    $order = $db->getone("select * from " . table('order') . " WHERE oid ='{$v_oid}' AND is_paid= '1' LIMIT 1 ");
    if ($order) {
        $user = get_user_info($order['uid']);
        $sql = "UPDATE " . table('order') . " SET is_paid= '2',payment_time='{$timestamp}' WHERE oid='{$v_oid}' LIMIT 1 ";
        if (!$db->query($sql)) {
            return false;
        }
        if ($order['amount'] == '0.00') {
            $ismoney = 1;
        } else {
            $ismoney = 2;
        }
        if ($order['points'] > 0) {
            report_deal($order['uid'], 1, $order['points']);
            $user_points = get_user_points($order['uid']);
            $notes = date('Y-m-d H:i', time()) . "通过:" . get_payment_info($order['payment_name'], true) . " 成功充值 " . $order['amount'] . "元,(+{$order['points']}),(剩余:{$user_points}),订单:{$v_oid}";
            write_memberslog($order['uid'], 1, 9001, $user['username'], $notes);
            //会员套餐变更记录。会员购买成功。2表示:会员自己购买
            write_setmeallog($order['uid'], $user['username'], $notes, 2, $order['amount'], $ismoney, 1);
        } elseif ($order['setmeal'] > 0) {
            set_members_setmeal($order['uid'], $order['setmeal']);
            $setmeal = get_setmeal_one($order['setmeal']);
            $notes = date('Y-m-d H:i', time()) . "通过:" . get_payment_info($order['payment_name'], true) . " 成功充值 " . $order['amount'] . "元并开通{$setmeal['setmeal_name']}";
            write_memberslog($order['uid'], 1, 9002, $user['username'], $notes);
            //会员套餐变更记录。会员购买成功。2表示:会员自己购买
            write_setmeallog($order['uid'], $user['username'], $notes, 2, $order['amount'], $ismoney, 2, 1);
        }
        //sendemail
        $mailconfig = get_cache('mailconfig');
        if ($mailconfig['set_payment'] == "1" && $user['email_audit'] == "1" && $order['amount'] > 0) {
            dfopen("{$_CFG['site_domain']}{$_CFG['site_dir']}plus/asyn_mail.php?uid={$order['uid']}&key=" . asyn_userkey($order['uid']) . "&act=set_payment");
        }
        //sendemail
        //sms
        $sms = get_cache('sms_config');
        if ($sms['open'] == "1" && $sms['set_payment'] == "1" && $user['mobile_audit'] == "1" && $order['amount'] > 0) {
            dfopen("{$_CFG['site_domain']}{$_CFG['site_dir']}plus/asyn_sms.php?uid={$order['uid']}&key=" . asyn_userkey($order['uid']) . "&act=set_payment");
        }
        //sms
        return true;
    }
    return true;
}
Ejemplo n.º 8
0
     if ($order['amount'] == '0.00') {
         $ismoney = 1;
     } else {
         $ismoney = 2;
     }
     if ($order['points'] > 0) {
         report_deal($order['uid'], 1, $order['points']);
         $user_points = get_user_points($order['uid']);
         $notes = date('Y-m-d H:i', time()) . "通过:" . get_payment_info($order['payment_name'], true) . " 成功充值 " . $order['amount'] . "元,(+{$order['points']}),(剩余:{$user_points}),订单:{$v_oid}";
         write_memberslog($order['uid'], 1, 9001, $user['username'], $notes);
         //会员套餐变更记录。会员购买成功。2表示:会员自己购买
         write_setmeallog($order['uid'], $user['username'], $notes, 2, $order['amount'], $ismoney, 1);
     } elseif ($order['setmeal'] > 0) {
         set_members_setmeal($order['uid'], $order['setmeal']);
         $setmeal = get_setmeal_one($order['setmeal']);
         $notes = date('Y-m-d H:i', time()) . "通过:" . get_payment_info($order['payment_name'], true) . " 成功充值 " . $order['amount'] . "元并开通{$setmeal['setmeal_name']}";
         write_memberslog($order['uid'], 1, 9002, $user['username'], $notes);
         //会员套餐变更记录。会员购买成功。2表示:会员自己购买
         write_setmeallog($order['uid'], $user['username'], $notes, 2, $order['amount'], $ismoney, 2, 1);
     }
 } elseif ($order['pay_type'] == '2') {
     $order_name = "广告位订单";
     write_memberslog($_SESSION['uid'], 1, 9001, $_SESSION['username'], "申请广告位:<strong>{$order['description']}</strong>,(花费: {$order['amount']})。", 1, 1020, "申请广告位", "-{$order['amount']}", "{$user_points}");
 } elseif ($order['pay_type'] == '3') {
     $order_name = "短信套餐订单";
     $user = get_user_info($order['uid']);
     if ($order['setmeal'] > 0) {
         //查看短信套餐
         set_members_sms($order['uid'], intval($order['setmeal']));
         //支付成功,向用户增加短信条数
         $user_points = get_user_setmeal($order['uid']);
Ejemplo n.º 9
0
    if ($order['is_paid'] == '1') {
        $contents = str_replace('{#$order_is_paid#}', '未完成', $contents);
        $button = '<a href="?act=payment&order_id={#$order_id#}"><input type="button" value="支付" class="btn-65-30blue btn-big-font" /></a>';
        $contents = str_replace('{#$button#}', $button, $contents);
    } else {
        $contents = str_replace('{#$order_is_paid#}', '已支付', $contents);
        $button = '<input type="button" value="已支付" class="btn-65-30blue btn-big-font" />';
        $contents = str_replace('{#$button#}', $button, $contents);
    }
    $contents = str_replace('{#$order_des#}', $order['description'], $contents);
    if ($order['payment_name'] != 'points') {
        $contents = str_replace('{#$order_amount#}', '¥' . $order['amount'], $contents);
    } else {
        $contents = str_replace('{#$order_amount#}', '兑换' . $order['amount'] . '积分', $contents);
    }
    $contents = str_replace('{#$order_payname#}', get_payment_info($order['payment_name'], ture), $contents);
    if ($order['notes']) {
        $contents = str_replace('{#$order_note#}', $order['notes'], $contents);
    } else {
        $contents = str_replace('{#$order_note#}', "无", $contents);
    }
    $contents = str_replace('{#$order_id#}', $order['id'], $contents);
    exit($contents);
} elseif ($act == "sendtoemail") {
    global $_CFG;
    $uid = intval($_GET['uid']);
    $resume_id = intval($_GET['resume_id']);
    $email = trim($_GET['email']);
    $resume_basic = get_resume_basic($resume_id);
    if ($resume_basic['tag_cn']) {
        $resume_tag = explode(',', $resume_basic['tag_cn']);
Ejemplo n.º 10
0
    } else {
        showmsg("添加订单失败!", 0);
    }
} elseif ($act == 'payment') {
    $setmeal = get_user_setmeal($_SESSION['uid']);
    if ($setmeal['endtime'] > 0) {
        $setmeal_endtime = sub_day($setmeal['endtime'], time());
    } else {
        $setmeal_endtime = "无限期";
    }
    $smarty->assign('user_setmeal', $setmeal);
    $smarty->assign('setmeal_endtime', $setmeal_endtime);
    $smarty->assign('payment', get_payment());
    $order_id = intval($_GET['order_id']);
    $myorder = get_order_one($_SESSION['uid'], $order_id);
    $payment = get_payment_info($myorder['payment_name']);
    if (empty($payment)) {
        showmsg("支付方式错误!", 0);
    }
    $fee = number_format($amount / 100 * $payment['fee'], 1, '.', '');
    //手续费
    $order['oid'] = $myorder['oid'];
    //订单号
    $order['v_url'] = $_CFG['site_domain'] . $_CFG['site_dir'] . "include/payment/respond_" . $payment['typename'] . ".php";
    $order['v_amount'] = $myorder['amount'] + $fee;
    if ($myorder['payment_name'] != 'remittance' && $myorder['payment_name'] != 'weixinpay') {
        require_once QISHI_ROOT_PATH . "include/payment/" . $payment['typename'] . ".php";
        $payment_form = get_code($order, $payment);
        if (empty($payment_form)) {
            showmsg("在线支付参数错误!", 0);
        }
Ejemplo n.º 11
0
*/
define('IN_QISHI', true);
require_once dirname(__FILE__) . '/../common.inc.php';
require_once QISHI_ROOT_PATH . 'include/mysql.class.php';
$db = new mysql($dbhost, $dbuser, $dbpass, $dbname);
require_once QISHI_ROOT_PATH . "include/payment/alipay.php";
$dingdan = $_POST['out_trade_no'];
//获取订单号
$total_fee = $_POST['total_fee'];
//获取总价格
$order = $db->getone("select * from " . table('order') . " WHERE oid ='{$dingdan}'  LIMIT 1 ");
$funtype = array('1' => 'include/fun_company.php', 4 => 'include/fun_train.php', 3 => 'include/fun_hunter.php');
require_once QISHI_ROOT_PATH . $funtype[$order['utype']];
$time = date('Y-m-d H:i:s', time());
$log_file = QISHI_ROOT_PATH . '/data/' . 'allpay_safe.txt';
fputs(fopen($log_file, 'a+'), $time . '/' . $dingdan . '/' . $order['is_paid'] . "\r\n");
$payment = get_payment_info('alipay');
$partner = trim($payment['partnerid']);
$key = trim($payment['ytauthkey']);
$sign_type = "MD5";
$_input_charset = "GBK";
$transport = "http";
$alipay = new alipay_notify($partner, $key, $sign_type, $_input_charset, $transport);
$verify_result = $alipay->notify_verify();
if ($verify_result) {
    //验证成功
    order_paid($dingdan);
    return 'success';
} else {
    return 'err';
}
Ejemplo n.º 12
0
function order_paid($v_oid)
{
    global $db, $timestamp, $_CFG;
    $order = $db->getone("select * from " . table('order') . " WHERE oid ='{$v_oid}' AND is_paid= '1' LIMIT 1 ");
    if ($order['pay_type'] == '1' || $order['pay_type'] == '4') {
        $order_name = "套餐积分订单";
        $user = get_user($order['uid']);
        $sql = "UPDATE " . table('order') . " SET is_paid= '2',payment_time='{$timestamp}' WHERE oid='{$v_oid}' LIMIT 1 ";
        if (!$db->query($sql)) {
            return false;
        }
        if ($order['amount'] == '0.00') {
            $ismoney = 1;
        } else {
            $ismoney = 2;
        }
        if ($order['points'] > 0) {
            report_deal($order['uid'], 1, $order['points']);
            $user_points = get_user_points($order['uid']);
            $notes = "操作人:{$_SESSION['admin_name']},说明:确认收款。收款金额:{$order['amount']} 。" . date('Y-m-d H:i', time()) . "通过:" . get_payment_info($order['payment_name'], true) . " 成功充值 " . $order['amount'] . "元,(+{$order['points']}),(剩余:{$user_points}),订单:{$v_oid}";
            write_memberslog($order['uid'], 1, 9001, $user['username'], $notes);
            //会员套餐变更记录。管理员后台设置会员订单购买成功。4表示:管理员后台开通
            write_setmeallog($order['uid'], $user['username'], $notes, 4, $order['amount'], $ismoney, 1, 1);
        }
        if ($order['setmeal'] > 0) {
            set_members_setmeal($order['uid'], $order['setmeal']);
            $setmeal = get_setmeal_one($order['setmeal']);
            $notes = "操作人:{$_SESSION['admin_name']},说明:确认收款,收款金额:{$order['amount']} 。" . date('Y-m-d H:i', time()) . "通过:" . get_payment_info($order['payment_name'], true) . " 成功充值 " . $order['amount'] . "元并开通{$setmeal['setmeal_name']}";
            write_memberslog($order['uid'], 1, 9002, $user['username'], $notes);
            //会员套餐变更记录。管理员后台设置会员订单购买成功。4表示:管理员后台开通
            write_setmeallog($order['uid'], $user['username'], $notes, 4, $order['amount'], $ismoney, 2, 1);
        }
    } elseif ($order['pay_type'] == '2') {
        $order_name = "广告位订单";
        $sql = "UPDATE " . table('order') . " SET is_paid= '2',payment_time='{$timestamp}' WHERE oid='{$v_oid}' LIMIT 1 ";
        //is_paid =2 为确定支付
        if (!$db->query($sql)) {
            return false;
        }
        write_memberslog($_SESSION['uid'], 1, 9001, $_SESSION['username'], "申请广告位:<strong>{$order['description']}</strong>,(花费: {$order['amount']})。", 1, 1020, "申请广告位", "-{$order['amount']}", "{$user_points}");
    } elseif ($order['pay_type'] == '3') {
        $order_name = "短信订单";
        $user = get_user($order['uid']);
        $sql = "UPDATE " . table('order') . " SET is_paid= '2',payment_time='{$timestamp}' WHERE oid='{$v_oid}' LIMIT 1 ";
        if (!$db->query($sql)) {
            return false;
        }
        if ($order['setmeal'] > 0) {
            //查看短信套餐
            set_members_sms($order['uid'], intval($order['setmeal']));
            //支付成功,向用户增加短信条数
            $user_points = get_user_setmeal($order['uid']);
            write_memberslog($_SESSION['uid'], 1, 9003, $_SESSION['username'], "短信充值套餐:<strong>{$order['description']}</strong>,(- {$order['amount']}),(剩余:{$user_points['set_sms']})", 1, 1020, "申请广告位", "- {$order['amount']}", "{$user_points['set_sms']}");
        }
    } elseif ($order['pay_type'] == '7') {
        if ($order['amount'] == '0.00') {
            $ismoney = 1;
        } else {
            $ismoney = 2;
        }
        balance_deal($order['uid'], 1, $order['amount']);
        $user_balance = get_user_balance($order['uid']);
        $sql = "UPDATE " . table('order') . " SET is_paid= '2',payment_time='{$timestamp}' WHERE oid='{$v_oid}' LIMIT 1 ";
        //is_paid =2 为确定支付
        if (!$db->query($sql)) {
            return false;
        }
        $note = "余额充值:<strong>{$order['description']}</strong>,(: {$order['amount']})。当前余额为:{$user_balance}";
        write_memberslog($_SESSION['uid'], 1, 9101, $_SESSION['username'], $note, 4, $order['amount'], $ismoney, 1, 1);
    } elseif ($order['pay_type'] == '9') {
        if ($order['amount'] == '0.00') {
            $ismoney = 1;
        } else {
            $ismoney = 2;
        }
        if (get_user_can_balance($order['uid']) < $order['amount']) {
            adminmsg('余额不足', 1);
            return false;
        }
        balance_deal($order['uid'], 2, $order['amount']);
        $user_balance = get_user_balance($order['uid']);
        $sql = "UPDATE " . table('order') . " SET is_paid= '2',payment_time='{$timestamp}' WHERE oid='{$v_oid}' LIMIT 1 ";
        //is_paid =2 为确定支付
        if (!$db->query($sql)) {
            return false;
        }
        $note = "余额提现:<strong>{$order['description']}</strong>,(: {$order['amount']})。当前余额为:{$user_balance}";
        write_memberslog($_SESSION['uid'], 1, 9101, $_SESSION['username'], $note, 4, $order['amount'], $ismoney, 1, 1);
    }
    //发送邮件
    $mailconfig = get_cache('mailconfig');
    if ($mailconfig['set_payment'] == "1" && $user['email_audit'] == "1") {
        dfopen($_CFG['site_domain'] . $_CFG['site_dir'] . "plus/asyn_mail.php?uid=" . $order['uid'] . "&key=" . asyn_userkey($order['uid']) . "&act=set_payment");
    }
    //发送邮件完毕
    //sms
    $sms = get_cache('sms_config');
    if ($sms['open'] == "1" && $sms['set_payment'] == "1" && $user['mobile_audit'] == "1") {
        dfopen($_CFG['site_domain'] . $_CFG['site_dir'] . "plus/asyn_sms.php?uid=" . $order['uid'] . "&key=" . asyn_userkey($order['uid']) . "&act=set_payment");
    }
    //微信通知
    set_payment($order['uid'], $order_name, $order['oid'], $order['amount']);
    write_log("将订单号为" . $v_oid . "的订单设置为确认收款", $_SESSION['admin_name'], 3);
    return true;
}
Ejemplo n.º 13
0
            require_once QISHI_ROOT_PATH . "include/payment/" . $payment['typename'] . ".php";
            $payment_form = get_code($order, $payment);
            if (empty($payment_form)) {
                showmsg("在线支付参数错误!", 0);
            }
        } elseif ($myorder['payment_name'] == 'weixinpay') {
            require_once QISHI_ROOT_PATH . 'include/payment/native.php';
            $smarty->assign('w_url', urlencode($url2));
            fopen(QISHI_ROOT_PATH . 'data/wxpay/' . $myorder['oid'] . '.tmp', "w") or die("无法打开缓存文件!");
            $_SESSION['wxpay_no'] = $myorder['oid'];
        }
    }
    if ($myorder['payment_name'] == "points") {
        $myorder['amount'] = intval($myorder['amount']);
    }
    $myorder['payment_name_'] = get_payment_info($myorder['payment_name'], true);
    $smarty->assign('myorder', $myorder);
    $smarty->assign('fee', $fee);
    $smarty->assign('title', '付款 - 企业会员中心 - ' . $_CFG['site_name']);
    $smarty->assign('byname', $payment);
    $smarty->assign('payment_form', $payment_form);
    $smarty->display('member_company/company_adv_order_pay.htm');
} elseif ($act == "adv_order_pay") {
    $orderid = intval($_GET['order_id']) ? intval($_GET['order_id']) : showmsg("您没有选择订单!", 1);
    $myorder = get_adv_order_one($_SESSION['uid'], $orderid);
    if (adv_order_paid($myorder['oid'])) {
        $link[0]['text'] = "查看订单";
        $link[0]['href'] = 'company_service.php?act=order_list';
        $link[1]['text'] = "会员中心首页";
        $link[1]['href'] = 'company_index.php?act=';
        showmsg("操作成功,请等待管理员审核!", 2, $link);
Ejemplo n.º 14
0
function update_payment_action() {
  global $params, $actions, $path, $l_payment;

  $id = $params['payment_id'];
  if ($id > 0) {

    $p = get_payment_info($id);
    // Detail Consult
    $actions['payment']['detailconsult']['Url'] = "$path/payment/payment_index.php?action=detailconsult&amp;payment_id=$id";
    $actions['payment']['detailconsult']['Condition'][] = 'insert';

    // Sel invoice : Invoice selection (menu)
    $actions['payment']['sel_invoice']['Url'] = "$path/invoice/invoice_index.php?action=ext_get_ids&amp;popup=1&amp;ext_action=invoice_add&amp;ext_url=".urlencode($path."/payment/payment_index.php?action=invoice_add&amp;payment_id=$id&amp;sel_invoice_id=")."&amp;ext_id=$id&amp;ext_target=$l_payment&amp;company=".urlencode($p['company']);
    $actions['payment']['sel_invoice']['Condition'][] = 'insert';

    // Invoice
    $actions['payment']['detail_invoice']['Url'] = "$path/payment/payment_index.php?action=detail_invoice&amp;payment_id=$id";
    $actions['payment']['detail_invoice']['Condition'][] = 'insert';

    // Detail Update
    $actions['payment']['detailupdate']['Url'] = "$path/payment/payment_index.php?action=detailupdate&amp;payment_id=$id";
    $actions['payment']['detailupdate']['Condition'][] = 'insert';

    // Check Delete
    $actions['payment']['check_delete']['Url'] = "$path/payment/payment_index.php?action=check_delete&amp;payment_id=$id";
    $actions['payment']['check_delete']['Condition'][] = 'insert';
  }
}