代理客户实名
This commit is contained in:
@@ -194,20 +194,34 @@ class Index
|
||||
die;
|
||||
}
|
||||
|
||||
private function getCred(){
|
||||
$ak = "JDC_A3B38E573D7404F976472FB42F52";
|
||||
$sk = "C9BAE98F49B42DA2DC02868A75AA3AD8";
|
||||
$cred = new Credentials($ak, $sk);
|
||||
return $cred;
|
||||
}
|
||||
public function aliverify($temp)
|
||||
{
|
||||
$info = Aliverify::initVerify2($temp);
|
||||
$user = new UserModel;
|
||||
$data = [];
|
||||
if($info){
|
||||
$update_one['certify_id'] = $info['certifyId'];
|
||||
$update_one = [];
|
||||
|
||||
$client = new CloudauthClient([
|
||||
'credentials' => $this->getCred(),
|
||||
'version' => 'latest',
|
||||
'scheme' => 'http'
|
||||
]);
|
||||
|
||||
$res = $client->GetAliveUrl([
|
||||
'name' => $temp['name'],
|
||||
'idcard' => $temp['id_code'],
|
||||
'returnUrl' => 'https://php-api.juip.com/taobao/Publicget/getresult?id_code='.$temp['id_code']
|
||||
]);
|
||||
|
||||
if(isset($res['result']['code']) && $res['result']['code'] == 'ok'){
|
||||
$update_one['certify_id'] = $res['result']['token'];
|
||||
$update_one['Name'] = $temp['name'];
|
||||
if(isset($temp['phone'])){
|
||||
$update_one['Phone'] = $temp['phone'];
|
||||
}
|
||||
$update_one['id_code'] = $temp['id_code'];
|
||||
$data['certify_id'] = $info['certifyId'];
|
||||
$data['url'] = $info['url'];
|
||||
$data['url'] = $res['result']['url'];
|
||||
if($user->updateOne(['LoginCode'=>$temp['phone']],$update_one)){
|
||||
$data['Code'] = 10000;
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user