|
|
@ -118,10 +118,11 @@ class OcrLicense |
|
|
|
$data['client_id'] = $this->clientId; |
|
|
|
$data['client_id'] = $this->clientId; |
|
|
|
$data['client_secret'] = $this->clientSecret; |
|
|
|
$data['client_secret'] = $this->clientSecret; |
|
|
|
$result = $this->post(self::TOKENURL, $data); |
|
|
|
$result = $this->post(self::TOKENURL, $data); |
|
|
|
|
|
|
|
|
|
|
|
if (!empty($result->access_token)) { |
|
|
|
if (!empty($result->access_token)) { |
|
|
|
$token = $result->access_token; |
|
|
|
$token = $result->access_token; |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
$this->msg = '获取token失败' . $this->clientId . ' ' . $this->clientSecret; |
|
|
|
$this->msg = '获取token失败' . json_encode($result); |
|
|
|
} |
|
|
|
} |
|
|
|
return $token; |
|
|
|
return $token; |
|
|
|
} |
|
|
|
} |
|
|
|