w7corp / easywechat

📦 一个 PHP 微信 SDK

Home Page:https://easywechat.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

如何自定义access_token, ticket的获取管理

ixqbar opened this issue · comments

commented

access_token, ticket已经有其他应用进行管理, 使用该框架,如何实现自定义管理,防止内部自动获取覆盖掉原有系统机制对access_token, ticket的管理, 可有自定义方式返回access_token, ticket ?

文案只找到access_token的自定义管理, ticket 可有?

https://easywechat.com/6.x/client.html#%E8%87%AA%E5%AE%9A%E4%B9%89-access-token

你自己写一个类实现 RefreshableJsApiTicketInterface, 然后 $app->setTicket(new YourTicket) 就好了:

https://github.com/w7corp/easywechat/blob/6.x/src/OfficialAccount/Application.php#L206