notify.php 2.91 KB
<?php

define('IN_MOBILE', true);
require '../../../../framework/bootstrap.inc.php';
require_once 'PayNotifyCallBack.php';
require_once IA_ROOT.'/addons/zh_cjdianc/inc/Log.php';
global $_W, $_GPC;
//$input = file_get_contents('php://input');
//$isxml = true;
//Log::debug($input);

$notify = new PayNotifyCallBack();
$notify->Handle(false);


/*
if ($qgorder['state']==1) {
    $time=time();
    $good=pdo_get('cjdc_qggoods',array('id'=>$qgorder['good_id']));
    $dq_time=$time+$good['consumption_time']*60*60*24;
    pdo_update('cjdc_qgorder',array('state'=>2,'dq_time'=>$dq_time,'pay_time'=>date('Y-m-d H:i:s',$time)),array('id'=>$qgorder['id']));

getapi("https://".$_SERVER['HTTP_HOST'] . "/app/index.php?i=".$qgorder['uniacid']."&c=entry&a=wxapp&do=RushPrint&m=zh_cjdianc&order_id=".$qgorder['id']);//抢购打印
 $rst=getapi("https://".$_SERVER['HTTP_HOST'] . "/app/index.php?i=".$qgorder['uniacid']."&c=entry&a=wxapp&do=RushMessage&m=zh_cjdianc&order_id=".$qgorder['id']);
}
*/


/*
if ( $hyorder and $hyorder['state']==1) {
    pdo_update('cjdc_hyorder',array('state'=>2,'day'=>date('d'),'time'=>date('Y-m-d H:i:s')),array('id'=>$hyorder['id']));
    pdo_update('cjdc_user',array('dq_time'=>date('Y-m-d',strtotime("+".$hyorder['month']." month")),'hy_day'=>date('d'),'user_name'=>$hyorder['user_name'],'user_tel'=>$hyorder['user_tel']),array('id'=>$hyorder['user_id']));
}
*/

/*
if($czorder and $czorder['state']==1) {
    pdo_update('cjdc_czorder',array('state'=>2),array('id'=>$czorder['id']));
    $je=$res['total_fee']/100;
   $czhd = pdo_get('cjdc_czhd', array('uniacid' => $czorder['uniacid'],'full'=>$je));
   if($czhd['reduction']>0){
      pdo_update('cjdc_user', array('wallet +=' =>$je+$czhd['reduction']), array('id' => $czorder['user_id']));
      $cz['money'] = $je;
        $cz['user_id'] = $czorder['user_id'];
        $cz['type'] = 1;
        $cz['note'] = '在线充值';
        $cz['time'] = date('Y-m-d H:i:s');
       pdo_insert('cjdc_qbmx', $cz);
       $czzs['money'] = $czhd['reduction'];
        $czzs['user_id'] = $czorder['user_id'];
        $czzs['type'] = 1;
        $czzs['note'] = '充值赠送';
        $czzs['time'] = date('Y-m-d H:i:s');
       pdo_insert('cjdc_qbmx', $czzs);
   } else {
      pdo_update('cjdc_user', array('wallet +=' => $je), array('id' => $czorder['user_id']));
      $cz['money'] = $je;
        $cz['user_id'] = $czorder['user_id'];
        $cz['type'] = 1;
        $cz['note'] = '在线充值';
        $cz['time'] = date('Y-m-d H:i:s');
       pdo_insert('cjdc_qbmx', $cz);
   }
    // getapi("https://".$_SERVER['HTTP_HOST'] . "/app/index.php?i=".$czorder['uniacid']."&c=entry&a=wxapp&do=Recharge&m=zh_cjdianc&user_id=".$czorder['user_id']."&money=".$czorder['money']."&money2=".$czorder['money2']);//改变订单状态
    getapi("https://".$_SERVER['HTTP_HOST'] . "/app/index.php?i=".$czorder['uniacid']."&c=entry&a=wxapp&do=CzMessage&m=zh_cjdianc&order_id=".$czorder['id']);//改变订单状态
}
*/