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