-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
微信开放平台帐号管理 #817
微信开放平台帐号管理 #817
Conversation
src/OpenPlatform/Account/Client.php
Outdated
* with this source code in the file LICENSE. | ||
*/ | ||
|
||
namespace EasyWeChat\OpenPlatform\Base; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
命名空间 Base?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
$accessToken = new AuthorizerAccessToken($app); | ||
$accessToken->setOpenPlatformAccessToken($app['access_token']); | ||
|
||
$app['account'] = function ($app) use ($accessToken) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这里应该不用 new AuthorizerAccessToken
?这个是授权方的 AccessToken
直接这样就可以了:
$app['account'] = function ($app) {
return new Client($app);
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个也是我比较困惑的地方,这些接口是通过C端的token调用的,而api_query_auth这些B端接口是通过component_access_token调用的。似乎应该是 AuthorizerAccessToken?还是我理解有偏差?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个接口请求需要的 access_token 用的是授权方的 access_token ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
是的,类似的还有代替第三方实现的小程序的一些独有接口
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/OpenPlatform/Account/Client.php
Outdated
* | ||
* @return mixed | ||
*/ | ||
public function createAccount(string $appId) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
create
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok,我先测试一下逻辑再一起提交
微信开放平台帐号管理