|  | @@ -9,7 +9,7 @@ class Wechat extends Core
 | 
	
		
			
				|  |  |  		$project = Dever::project('pay');
 | 
	
		
			
				|  |  |  		$this->config = new \WxPayConfig();
 | 
	
		
			
				|  |  |  		# 通知接口
 | 
	
		
			
				|  |  | -		$config['notify'] = $this->url($config['type']);
 | 
	
		
			
				|  |  | +		$config['notify'] = $this->url($config['type'], $config['id']);
 | 
	
		
			
				|  |  |  		# 证书
 | 
	
		
			
				|  |  |  		$config['ssl'] = array
 | 
	
		
			
				|  |  |  		(
 | 
	
	
		
			
				|  | @@ -164,21 +164,25 @@ class Callback extends \WxPayNotify
 | 
	
		
			
				|  |  |  	public function NotifyProcess($objData, $config, &$msg)
 | 
	
		
			
				|  |  |  	{
 | 
	
		
			
				|  |  |  		$data = $objData->GetValues();
 | 
	
		
			
				|  |  | -		$obj = Dever::load('pay/lib/wechat');
 | 
	
		
			
				|  |  | +		$obj = Dever::load('pay/lib/core');
 | 
	
		
			
				|  |  |  		$callback = function($msg = '') use ($obj, $data) {
 | 
	
		
			
				|  |  |  			if ($msg) {
 | 
	
		
			
				|  |  |  				$msg = $data['transaction_id'] . ':' . $msg;
 | 
	
		
			
				|  |  |  			}
 | 
	
		
			
				|  |  |  			$obj->updateOrder($data['out_trade_no'], $data['cash_fee'], $msg);
 | 
	
		
			
				|  |  |  		};
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +		if(!array_key_exists("transaction_id", $data)){
 | 
	
		
			
				|  |  | +			$msg = '输入参数不正确';
 | 
	
		
			
				|  |  | +			$callback($msg);
 | 
	
		
			
				|  |  | +			return false;
 | 
	
		
			
				|  |  | +		}
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  		# 参数校验
 | 
	
		
			
				|  |  |  		if(!array_key_exists("return_code", $data) 
 | 
	
		
			
				|  |  |  			||(array_key_exists("return_code", $data) && $data['return_code'] != "SUCCESS")) {
 | 
	
		
			
				|  |  | -			$msg = '异常';
 | 
	
		
			
				|  |  | -			return false;
 | 
	
		
			
				|  |  | -		}
 | 
	
		
			
				|  |  | -		if(!array_key_exists("transaction_id", $data)){
 | 
	
		
			
				|  |  | -			$msg = '输入参数不正确';
 | 
	
		
			
				|  |  | +			$msg = $data['return_code'] . '(异常)';
 | 
	
		
			
				|  |  | +			$callback($msg);
 | 
	
		
			
				|  |  |  			return false;
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -196,6 +200,7 @@ class Callback extends \WxPayNotify
 | 
	
		
			
				|  |  |  			return false;
 | 
	
		
			
				|  |  |  		}
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |  		# 查询订单,判断订单真实性
 | 
	
		
			
				|  |  |  		if(!$this->Queryorder($data["transaction_id"])){
 | 
	
		
			
				|  |  |  			$msg = '订单查询失败';
 |