Skip to content
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

Merged
merged 6 commits into from
Jul 27, 2017
Merged

微信开放平台帐号管理 #817

merged 6 commits into from
Jul 27, 2017

Conversation

xleliu
Copy link
Contributor

@xleliu xleliu commented Jul 26, 2017

微信开放平台帐号管理

@xleliu xleliu changed the title Develop 微信开放平台帐号管理 Jul 26, 2017
* with this source code in the file LICENSE.
*/

namespace EasyWeChat\OpenPlatform\Base;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

命名空间 Base?

Copy link
Contributor Author

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) {
Copy link
Collaborator

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);
}

Copy link
Contributor Author

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?还是我理解有偏差?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个接口请求需要的 access_token 用的是授权方的 access_token ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

是的,类似的还有代替第三方实现的小程序的一些独有接口

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

*
* @return mixed
*/
public function createAccount(string $appId)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

create

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok,我先测试一下逻辑再一起提交

@mingyoung mingyoung merged commit b253076 into w7corp:develop Jul 27, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants