| 
						
						
							
								
							
						
						
					 | 
				
				 | 
				
					@ -10,6 +10,7 @@ use EasyWeChat\Factory; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					use EasyWeChat\Kernel\Exceptions\InvalidArgumentException; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					use EasyWeChat\Kernel\Exceptions\InvalidConfigException; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					use GuzzleHttp\Exception\GuzzleException; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					use Illuminate\Support\Facades\Cache; | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					/** | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					 * 跳转支付 | 
				
			
			
		
	
	
		
			
				
					| 
						
						
						
							
								
							
						
					 | 
				
				 | 
				
					@ -24,6 +25,12 @@ class SharePayController extends Controller | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (!$order_id) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								return $this->error('无效的ID'); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							$this->user_id = Cache::get(request()->header('Authentication')); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							if (!$this->user_id) { | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
								return $this->error('获取用户信息失败'); | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							} | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							//用户openid
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
							$openid = User::query()->where('id', $this->user_id)->value('openid'); //此处要用where,value()用find有BUG
 | 
				
			
			
		
	
		
			
				
					 | 
					 | 
				
				 | 
				
					
 | 
				
			
			
		
	
	
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
				
				 | 
				
					
  |