protected function getTokenFields($code)
{
$base = ['appid' => $this->clientId, 'code' => $code, 'grant_type' => 'authorization_code'];
if ($this->isOpenPlatform()) {
return array_merge($base, ['component_appid' => $this->config->get('wechat.open_platform.app_id'), 'component_access_token' => $this->config->get('wechat.open_platform.access_token')]);
}
return array_merge($base, ['secret' => $this->clientSecret]);
}