## 環境要求
* PHP >= 5.5
* [PHP cURL 擴展](http://php.net/manual/en/book.curl.php)
* [PHP OpenSSL 擴展](http://php.net/manual/en/book.openssl.php)
* [PHP SimpleXML 擴展](http://php.net/manual/en/book.simplexml.php)
## 通過 Git 獲取 Endor
您可以通過以下方式獲取最新的Endor框架
github : [https://github.com/DarthAhsoka/Endor-Wechat.git](https://github.com/DarthAhsoka/Endor-Wechat.git)
碼云:[https://gitee.com/ahsoka/endor-wechat.git](https://gitee.com/ahsoka/endor-wechat.git)
Coding:[https://git.dev.tencent.com/dtid\_4723e196baa70b5f/Endor-Wechat.git](https://git.dev.tencent.com/dtid\_4723e196baa70b5f/Endor-Wechat.git)
## 引入項目
該項目的引入是非常簡單的,該項目的文件目錄是可以放在任何位置的,在您的項目中,可以通過PHP框架自帶的
第三方庫引入工具引入,也可以直接使用 require 項目路徑/EndorAutoLoader.php 即可。
>[info] 該項目提供一個簡易的自動加載器,根據名字空間,自動加載類,您可以在您的項目任何地方使用endor而
> 不用require具體文件。
>
## 擴展項目
您只需要給擴展的文件正確定義所在的命名空間,并且命名空間的路徑與類庫文件的目錄一致,那么就可以實現類的自動加載,從而實現真正的惰性加載。
- 1、序言
- 1.1、更新說明
- 1.2、更新計劃
- 2、開始使用 Endor
- 3、目錄結構
- 4、類說明
- 4.1、WechatConfig
- 4.2、WechatValid
- 4.3、WechatCommon
- 4.4、WechatException
- 4.5、基礎接口
- 4.5.1、ShortUrl
- 4.5.2、WechatServerApi
- 4.6、菜單接口
- 4.6.1、菜單類設計
- 4.6.2、Menu
- 4.6.3、ClickMenu
- 4.6.4、ViewMenu
- 4.6.5、MiniProgramMenu
- 4.6.6、MenuApi
- 4.7、消息接口
- 4.7.1、Receiver
- 4.7.2、Message
- 4.7.3、EventMessage
- 4.7.4、TextMessage
- 4.7.5、ClickEventMessage
- 4.7.6、SubscribeEventMessage
- 4.7.7、UnSubscribeEventMessage
- 4.7.8、LocationEventMessage
- 4.7.9、ImageMessage
- 4.7.10、LinkMessage
- 4.7.11、NewsMessage
- 4.7.12、NewsContext
- 4.8、OAuth2.0權限驗證
- 4.8.1、WechatUser
- 4.8.2、OAuthApi
- 4.9、微信支付接口
- 4.9.1、微信支付類設計
- 4.9.2、PayApi
- 4.9.3、RequestPay
- 4.9.4、ResponsePay
- 4.9.5、UnifiedOrder
- 4.9.6、JsPay
- 4.9.7、Refund
- 4.9.8、Query
- 4.9.9、Bill
- 4.9.10、NotifyData
- 4.9.11、Notify
- 4.10、模板消息接口
- 4.10.1、TemplateContext
- 4.10.2、TemplateMessageApi
- 5、使用場景
- 5.1、微信接入服務器驗證
- 5.2、獲取微信API令牌(access_token)
- 5.3、獲取JS API
- 5.4、OAuth2.0靜默登錄
- 5.5、微信菜單
- 5.6、微信消息
- 5.7、微信支付
- 5.7.1、微信公眾號內JsApi支付
- 5.7.2、Native 模式二 掃碼支付
- 5.8、模板消息發送