Download the PHP package chunhei2008/easy-open-wechat without Composer

On this page you can find all versions of the php package chunhei2008/easy-open-wechat. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package easy-open-wechat

EasyOpenWechat SDK

Latest Stable Version Total Downloads License Monthly Downloads Daily Downloads composer.lock Build Status

说明

本SDK是基于EasyWechat开发,为了方便微信公众号第三方平台开发,封装了微信公众号授权第三方平台的开发,以及自动化的全网发布接入,所有的功能以及经过现网公众号平台测试,现发布正式1.0.0版本,在使用本SDK遇到问题可以联系我哦,如果觉得本项目对您有帮助麻烦给个star并周知,谢谢

安装

wiki

github wiki

使用示例

配置

除了新加的第三方平台的相关配置字段外其余字段依然是EasyWechat的配置字段

生成授权页面URI

第三方平台方可以在自己的网站:中放置“微信公众号授权”的入口,引导公众号运营者进入授权页。授权页网址为https://mp.weixin.qq.com/cgi-bin/componentloginpage?component_appid=xxxx&pre_auth_code=xxxxx&redirect_uri=xxxx,该网址中第三方平台方需要提供第三方平台方appid、预授权码和回调URI

授权回调页面

授权流程完成后,授权页会自动跳转进入回调URI,并在URL参数中返回授权码和过期时间(redirect_url?auth_code=xxx&expires_in=600);在得到授权码后,第三方平台方可以使用授权码换取授权公众号的接口调用凭据(authorizer_access_token,也简称为令牌),再通过该接口调用凭据,按照公众号开发者文档(mp.weixin.qq.com/wiki)的说明,去调用公众号相关API(能调用哪些API,取决于用户将哪些权限集授权给了第三方平台方,也取决于公众号自身拥有哪些接口权限),使用JS SDK等能力。具体请见【公众号第三方平台的接口说明】

授权事件处理

授权过程的所有授权事件响应,包括全网发布监测响应

公众号消息与事件处理

自定义

SDK默认的使用Cache对公众号的关键信息进行缓存存储,但是像authorizer_appid、authorizer_refresh_token等这样的关键信息数据存储最好是存储到数据库等持久存储地方,本SDK也有考虑到这一方面

authorizer_refresh_token存储与获取

默认的实现

默认实现是使用的Cache进行存储

自定义

  1. 数据库

  2. 服务提供者

  3. 服务提供者绑定到容器

授权事件

处理授权事件的响应以及对授权后的相关数据进行处理

  1. 实现AuthorizeHandlerContract契约

  2. 服务提供者绑定到容器

  3. 服务提供者绑定到容器

感谢

  1. EasyWeChat

All versions of easy-open-wechat with dependencies

PHP Build Version
Package Version
Requires overtrue/wechat Version ^3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package chunhei2008/easy-open-wechat contains the following files

Loading the files please wait ....