|
@@ 102-106 (lines=5) @@
|
| 99 |
|
|
| 100 |
|
$response_data = Http::_post(self::GET_COMPONENT_ACCESS_TOKEN, $request_data); |
| 101 |
|
|
| 102 |
|
if (!$response_data || !is_array($response_data) || empty($response_data)) { |
| 103 |
|
$this->setError(Http::$error); |
| 104 |
|
|
| 105 |
|
return false; |
| 106 |
|
} |
| 107 |
|
|
| 108 |
|
self::$cacheDriver->_set('component_access_token:' . $this->configs->component_app_id, $response_data['component_access_token'], 5000); |
| 109 |
|
|
|
@@ 131-135 (lines=5) @@
|
| 128 |
|
]; |
| 129 |
|
|
| 130 |
|
$response_data = Http::_post(self::GET_COMPONENT_PRE_AUTH_CODE . '?' . $query_data, $request_data); |
| 131 |
|
if (!$response_data || !is_array($response_data) || empty($response_data)) { |
| 132 |
|
$this->setError(Http::$error); |
| 133 |
|
|
| 134 |
|
return false; |
| 135 |
|
} |
| 136 |
|
|
| 137 |
|
$component_pre_auth_code = $response_data['pre_auth_code']; |
| 138 |
|
|