|  | @@ -223,7 +223,7 @@ class Payios extends Api
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          filePut("\r\n\r\n".'新请求');
 | 
	
		
			
				|  |  | -        $prefix = 'ios充值,user_id:'.$this->auth->id.',out_trade_no:'.$out_trade_no.',transaction_id:'.$transaction_id.'。';
 | 
	
		
			
				|  |  | +        $prefix = 'ios充值,user_id:'.$this->auth->id.',out_trade_no:'.$out_trade_no.',传入transaction_id:'.$transaction_id.'。';
 | 
	
		
			
				|  |  |          filePut($prefix.'参数apple_receipt:'.$receipt_data);
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |  
 | 
	
	
		
			
				|  | @@ -232,7 +232,7 @@ class Payios extends Api
 | 
	
		
			
				|  |  |          $order_map = [
 | 
	
		
			
				|  |  |              'user_id' => $this->auth->id,
 | 
	
		
			
				|  |  |              'out_trade_no' => $out_trade_no,
 | 
	
		
			
				|  |  | -            'transaction_id' => $transaction_id,
 | 
	
		
			
				|  |  | +//            'transaction_id' => $transaction_id,
 | 
	
		
			
				|  |  |          ];
 | 
	
		
			
				|  |  |          $order_info = Db::name('pay_order')->where($order_map)->lock(true)->find();
 | 
	
		
			
				|  |  |          if (!$order_info) {
 | 
	
	
		
			
				|  | @@ -257,10 +257,17 @@ class Payios extends Api
 | 
	
		
			
				|  |  |          $count = count($result['data']['receipt']['in_app']);
 | 
	
		
			
				|  |  |          $use_count = $count - 1;
 | 
	
		
			
				|  |  |          $product_id = $result['data']['receipt']['in_app'][$use_count]['product_id'];
 | 
	
		
			
				|  |  | +        $my_transaction_id = $result['data']['receipt']['in_app'][$use_count]['transaction_id'];
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |          if($product_id != $order_info['bundle_id']){
 | 
	
		
			
				|  |  |              Db::rollback();
 | 
	
		
			
				|  |  | -            filePut($prefix.'验证'.'非法请求,请立刻停止'.$product_id.'!='.$order_info['bundle_id']);
 | 
	
		
			
				|  |  | +            filePut($prefix.'验证'.'非法请求,请立刻停止product_id:'.$product_id.'!='.$order_info['bundle_id']);
 | 
	
		
			
				|  |  | +            $this->error('非法请求,请立刻停止');
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +        if($my_transaction_id != $transaction_id){
 | 
	
		
			
				|  |  | +            Db::rollback();
 | 
	
		
			
				|  |  | +            filePut($prefix.'验证'.'非法请求,请立刻停止transaction_id:'.$my_transaction_id.'!='.$transaction_id);
 | 
	
		
			
				|  |  |              $this->error('非法请求,请立刻停止');
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |  
 |