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

new master #34

Open
wants to merge 5 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion MIT-LICENSE.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License

Copyright (c) 2014-2017 Anyon<[email protected]>
Copyright (c) 2014-2017

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
36 changes: 4 additions & 32 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,34 +1,11 @@
[![Latest Stable Version](https://poser.pugx.org/zoujingli/wechat-php-sdk/v/stable)](https://packagist.org/packages/zoujingli/wechat-php-sdk)
[![Total Downloads](https://poser.pugx.org/zoujingli/wechat-php-sdk/downloads)](https://packagist.org/packages/zoujingli/wechat-php-sdk)
[![Latest Unstable Version](https://poser.pugx.org/zoujingli/wechat-php-sdk/v/unstable)](https://packagist.org/packages/zoujingli/wechat-php-sdk)
[![License](https://poser.pugx.org/zoujingli/wechat-php-sdk/license)](https://packagist.org/packages/zoujingli/wechat-php-sdk)

此`SDK`运行最底要求`PHP`版本`5.3`, 建议在`PHP7`上运行以获取最佳性能。

微信的部分接口需要缓存数据在本地,因此对目录需要有写权限。

我们鼓励大家使用`composer`来管理您的第三方库,方便后期更新操作(尤其是接口类)。

近期`access_token`经常无故失效,`SDK`已加入失败状态检测,自动重新获取`access_token`并返回结果.

此`SDK`已历经数个线上项目验证与考验,可靠性与稳定性极高,欢迎`fork`或`star`此项目。

# 新微信开发工具推荐
WeChatDeveloper:https://github.com/zoujingli/WeChatDeveloper

**微信SDK开发帮助及交流**
--
* **在做微信开发前,必需先阅读微信官方文档,此SDK也是基于之上进行的封装。**

* **文档链接地址**:http://www.kancloud.cn/zoujingli/wechat-php-sdk

* **Think.Admin**:https://github.com/zoujingli/Think.Admin

* **开发交流QQ群:513350915(新)**

**若对您有帮助,可以赞助并支持下作者哦,谢谢!**
--
![](http://plugs.ctolog.com/pay.png)


**官方接口文档链接**
Expand All @@ -39,13 +16,7 @@ WeChatDeveloper:https://github.com/zoujingli/WeChatDeveloper
* 微信开放平台:https://open.weixin.qq.com/
* 微信支付接入文档:https://mp.weixin.qq.com/cgi-bin/readtemplate?t=business/course2_tmpl&lang=zh_CN
* 微信商户平台:https://pay.weixin.qq.com

**微信`SDK`项目源文件托管**
--
* SDK 为开源项目,你可以把它用于任何地址,并不受任何约束,欢迎`fork`项目。
* 通过 [Github](https://github.com/zoujingli/wechat-php-sdk) 下载 SDK 源代码
* 通过 [OSChina](http://git.oschina.net/zoujingli/wechat-php-sdk) 下载 SDK 源代码
* 通过 [Composer](https://getcomposer.org) 包管理工具下载 SDK 源代码
* 第三方平台接入 : https://open.weixin.qq.com/cgi-bin/showdocument?action=dir_list&t=resource/res_list&verify=1&id=open1489144594_DhNoV&token=&lang=

**微信`SDK`封装对接及功能**
--
Expand Down Expand Up @@ -76,12 +47,13 @@ WeChatDeveloper:https://github.com/zoujingli/WeChatDeveloper
* 认证权限:分为订阅号、服务号认证,如前缀服务号则仅认证的服务号有此权限
* 支付权限:仅认证后的服务号可以申请此权限

**微信开放第三方平台** --- (案例及文档整理中)
**微信开放第三方平台** ---
--
* 公众号授权服务
* 授权服务
* 公众号推送消息代处理
* 公众号基础业务代处理
* 公众号支付代发起
* 小程序基础业务代理

**微信`SDK`版权声明**
--
Expand Down
2 changes: 2 additions & 0 deletions Wechat/Loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ static public function & get_instance($type, $config = array())
static public function & get($type, $config = array())
{
$index = md5(strtolower($type) . md5(json_encode(self::$config)));
#不做缓存
unset(self::$cache[$index]);
if (!isset(self::$cache[$index])) {
$basicName = 'Wechat' . ucfirst(strtolower($type));
$className = "\\Wechat\\{$basicName}";
Expand Down
Loading