7 Star 19 Fork 7

王东祥/HongYuDSC

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
wxpay_native_query.php 1.67 KB
一键复制 编辑 原始数据 按行查看 历史
鸿宇科技 提交于 2018-03-02 02:43 . Initial commit
<?php
/*
* $Author: z1988.com $
* $Id: user.php 17217 2011-01-19 06:29:08Z z1988.com $
*/
define('IN_ECS', true);
require(dirname(__FILE__) . '/includes/init.php');
require_once(ROOT_PATH . 'languages/' .$_CFG['lang']. '/user.php');
include_once(ROOT_PATH . '/includes/cls_image.php');
$image = new cls_image($_CFG['bgcolor']);
$user_id = $_SESSION['user_id'];
$action = isset($_REQUEST['act']) ? trim($_REQUEST['act']) : 'default';
$pay_id = intval($_GET['id']);
include_once(ROOT_PATH .'includes/cls_json.php');
$json = new JSON();
$result = array('error'=>0, 'message'=>'', 'content'=>'');
if(isset($_SESSION['last_order_query']))
{
if(time() - $_SESSION['last_order_query'] < 1)
{
$result['error'] = 1;
$result['message'] = $_LANG['order_query_toofast'];
die($json->encode($result));
}
}
$_SESSION['last_order_query'] = time();
if (empty($pay_id))
{
$result['error'] = 1;
$result['message'] = $_LANG['invalid_order_sn'];
die($json->encode($result));
}
$sql = "SELECT * ".
" FROM " . $ecs->table('pay_log').
" WHERE log_id = '$pay_id' LIMIT 1";
$row = $db->getRow($sql);
if (empty($row))
{
$result['error'] = 1;
$result['message'] = $_LANG['invalid_order_sn'];
die($json->encode($result));
}
$order_type = $row['order_type'];
$url = 'user.php?act=order_detail&order_id='.$row['order_id'];
if ( $order_type == 1 ){
$url = 'user.php?act=account_log';
}
if( $row['is_paid'] == 1){
$result['url'] = $url;
}
$result['is_paid'] = $row['is_paid'];
die($json->encode($result));
?>
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
PHP
1
https://gitee.com/doney/HongYuDSC.git
git@gitee.com:doney/HongYuDSC.git
doney
HongYuDSC
HongYuDSC
master

搜索帮助

D67c1975 1850385 1daf7b77 1850385