| 
						
						
							
								
							
						
						
					 | 
					@ -28,26 +28,29 @@ class callback extends publicBase { | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        $_SESSION['app_uid'] = $shopinfo['uid']; | 
					 | 
					 | 
					        $_SESSION['app_uid'] = $shopinfo['uid']; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        $_SESSION['app_name'] = $shopinfo['name']; | 
					 | 
					 | 
					        $_SESSION['app_name'] = $shopinfo['name']; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					
					 | 
					 | 
					        $state = $this->get('state'); | 
					 | 
					 | 
					        // 因云内不能访问外网 此方案行不通 需要购买出云访问服务才可以 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        if(strpos($state, "kuaileaid") !== false) { | 
					 | 
					 | 
					//         $state = $this->get('state'); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            $aid = str_replace('kuaileaid_', '', $state)+0; | 
					 | 
					 | 
					//         if(strpos($state, "kuaileaid") !== false) { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            if ($aid) { | 
					 | 
					 | 
					//             $aid = str_replace('kuaileaid_', '', $state)+0; | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                $params = array( | 
					 | 
					 | 
					//             if ($aid) { | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                    '_uid'          =>  API_PDD_UID, | 
					 | 
					 | 
					//                 $params = array( | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                    '_token'        =>  API_PDD_TOKEN, | 
					 | 
					 | 
					//                     '_uid'          =>  API_PDD_UID, | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                    'aid'           =>  $aid, | 
					 | 
					 | 
					//                     '_token'        =>  API_PDD_TOKEN, | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                    'access_token'  =>  $access_token, | 
					 | 
					 | 
					//                     'aid'           =>  $aid, | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                    'name'          =>  $name, | 
					 | 
					 | 
					//                     'access_token'  =>  $access_token, | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                    'expire_time'   =>  $expire_time | 
					 | 
					 | 
					//                     'name'          =>  $name, | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                ); | 
					 | 
					 | 
					//                     'expire_time'   =>  $expire_time | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                $json_res = $sobj->postCUrl(API_KUAILELUNWEN_UPDATE_PDD_AUTH_INFO, $params); | 
					 | 
					 | 
					//                 ); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                $res = json_decode($json_res, true); | 
					 | 
					 | 
					//                 $json_res = $sobj->postCUrl(API_KUAILELUNWEN_UPDATE_PDD_AUTH_INFO, $params); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                if (!$res['status']) $this->show_message($res['info']); | 
					 | 
					 | 
					//                 $obj->writeLog('kuailelunwen', 'pdd_auth.log', API_KUAILELUNWEN_UPDATE_PDD_AUTH_INFO.'|'.json_encode($params).'|'.$json_res."\n"); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                header('Location: http://www.kuailelunwen.com/pay/pay_list/paytype/1'); | 
					 | 
					 | 
					//                 $res = json_decode($json_res, true); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					                exit; | 
					 | 
					 | 
					//                 if (!$res['status']) $this->show_message($res['info']); | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					            } | 
					 | 
					 | 
					
 | 
				
			
			
				
				
			
		
	
		
		
			
				
					
					 | 
					 | 
					        } | 
					 | 
					 | 
					//                 header('Location: http://www.kuailelunwen.com/pay/pay_list/paytype/1'); | 
				
			
			
				
				
			
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					//                 exit; | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					//             } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					 | 
					 | 
					 | 
					//         } | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					
 | 
					 | 
					 | 
					
 | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        header('Location: /'); | 
					 | 
					 | 
					        header('Location: /'); | 
				
			
			
		
	
		
		
			
				
					 | 
					 | 
					        exit; | 
					 | 
					 | 
					        exit; | 
				
			
			
		
	
	
		
		
			
				
					| 
						
							
								
							
						
						
						
					 | 
					
  |