header('location:index.php?goods-config=1&g_id=' . $g_id . $is_part); exit; } if (isset($_POST['filtOrder'])) { // mylog(); pdoUpdate('order_tbl', array('stu' => $_POST['stu'], 'express_id' => $_POST['express'], 'express_order' => $_POST['expressNumber']), array('id' => $_POST['filtOrder'])); // mylog(); if ($_POST['stu'] == '2') { // mylog(); include_once '../wechat/serveManager.php'; $query = pdoQuery('user_express_query_view', null, array('id' => $_POST['filtOrder']), ' limit 1'); $inf = $query->fetch(); // mylog(); $templateArray = array('first' => array('value' => '您在阿诗顿官方商城的网购订单已发货:'), 'keyword1' => array('value' => $inf['express_name'], 'color' => '#0000ff'), 'keyword2' => array('value' => $inf['express_order'], 'color' => '#0000ff'), 'remark' => array('value' => '请留意物流电话通知')); // mylog(); $request = sendTemplateMsg($inf['c_id'], $template_key_express, 'http://m.kuaidi100.com/index_all.html?type=' . $inf['express_id'] . '&postid=' . $inf['express_order'], $templateArray); mylog($request); } mylog(); header('location: index.php?orders=1'); exit; } if (isset($_GET['start_promotions'])) { pdoInsert('promotions_tbl', array('g_id' => $_GET['g_id'], 'd_id' => $_GET['d_id'])); header('location: index.php?promotions=1'); exit; } if (isset($_GET['delete_promotions'])) { $str = 'delete from promotions_tbl where d_id=' . $_GET['d_id']; exeNew($str); header('location: index.php?promotions=1');
//请务必判断请求时的total_fee、seller_id与通知时获取的total_fee、seller_id为一致的 //如果有做过处理,不执行商户的业务程序 //注意: //退款日期超过可退款期限后(如三个月可退款),支付宝系统发送该交易状态通知 //调试用,写文本函数记录程序运行情况是否正常 //logResult("这里写入想要调试的代码变量值,或其他运行的结果记录"); } else { if ($_POST['trade_status'] == 'TRADE_SUCCESS') { // pdoUpdate('order_tbl',array('stu'=>'1'),array('id'=>$_GET['out_trade_no'])); include_once '../wechat/serveManager.php'; $orderId = $out_trade_no; pdoUpdate('order_tbl', array('stu' => "1"), array('id' => $orderId)); $query = pdoQuery('order_tbl', null, array('id' => $orderId), ' limit 1'); $inf = $query->fetch(); $payChkArray = array('first' => array('value' => '您在阿诗顿商城的网购订单已支付成功:'), 'orderno' => array('value' => $orderId, 'color' => '#0000ff'), 'amount' => array('value' => '¥' . $total_fee, 'color' => '#0000ff'), 'remark' => array('value' => '商城即将安排发货,请留意物流通知')); $re = sendTemplateMsg($inf['c_id'], $template_key_order, '', $payChkArray); //判断该笔订单是否在商户网站中已经做过处理 //如果没有做过处理,根据订单号(out_trade_no)在商户网站的订单系统中查到该笔订单的详细,并执行商户的业务程序 //请务必判断请求时的total_fee、seller_id与通知时获取的total_fee、seller_id为一致的 //如果有做过处理,不执行商户的业务程序 //注意: //付款完成后,支付宝系统发送该交易状态通知 //调试用,写文本函数记录程序运行情况是否正常 //logResult("这里写入想要调试的代码变量值,或其他运行的结果记录"); } } //——请根据您的业务逻辑来编写程序(以上代码仅作参考)—— echo "success"; //请不要修改或删除 ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// } else {
echo $dataArray['return_msg']; exit; } echo $dataJson; exit; } else { echo getOrderStu($inf['stu']); } } if (isset($GLOBALS["HTTP_RAW_POST_DATA"])) { $tmpmsg = array('touser' => $to, 'template_id' => 'oMhzLlRCMJ_vXQKQL9Yx12DsG8fXlIUzcz0qz4kb9SI', 'url' => 'http://www.qq.com', 'data' => array('first' => array('value' => '交易成功'), 'product' => array('value' => '测试商品1'), 'price' => array('value' => '1988.00'), 'time' => array('value' => '1月9日16:00'), 'remark' => array('value' => '欢迎再次选购'))); $error = array('return_code' => 'SUCCESS', 'return_msg' => 'OK'); $responseData = xmlToArray($GLOBALS["HTTP_RAW_POST_DATA"]); // mylog(getArrayInf($responseData)); if ('SUCCESS' == $responseData['return_code']) { if ('SUCCESS' == $responseData['result_code']) { if (signVerify($responseData)) { include_once '../wechat/serveManager.php'; $orderId = $responseData['out_trade_no']; pdoUpdate('order_tbl', array('stu' => "1"), array('id' => $orderId)); $payChkArray = array('first' => array('value' => '您在阿诗顿商城的网购订单已支付成功:'), 'orderno' => array('value' => $orderId, 'color' => '#0000ff'), 'amount' => array('value' => '¥' . $responseData['total_fee'] / 100, 'color' => '#0000ff'), 'remark' => array('value' => '商城即将安排发货,请留意物流通知')); $re = sendTemplateMsg($responseData['openid'], $template_key_order, '', $payChkArray); } else { } } else { } } else { } echo toXml($error); exit; }