微信 接口配置信息修改
2017-09-12 08:51
267 查看
<?php /** * Created by PhpStorm. * User: 兔儿神 * Date: 2017/9/11 * Time: 8:55 */ namespace app\modules\wechat\controllers; use yii\web\Controller; class ExamController extends Controller { public function actionIndex() { if($this->checkMsg()) { echo $_GET['echostr']; } } private function checkMsg() { $token = 'tuershen';//自定义 $timestamp = $_GET['timestamp']; $nonce = $_GET['nonce']; $signature = $_GET['signature']; $tmp = [$token, $timestamp, $nonce];//$token、$timestamp、$nonce放在一个数组中 sort($tmp, SORT_STRING);//将token、timestamp、nonce三个参数进行字典序排序 $tmp_sha1 = sha1(implode('',$tmp));//将三个参数字符串拼接成一个字符串进行sha1加密 //开发者获得加密后的字符串可与signature对比 if ($tmp_sha1 == $signature) { return true; } else { return false; } } } https://mp.weixin.qq.com/debug/cgi-bin/sandboxinfo?action=showinfo&t=sandbox/index 打开连接,修改配置 URL 一定要写正确,token是你自定义好的 $token = 'tuershen';//自定义 这样修改配置就成功了
相关文章推荐
- 关于微信公众平台修改接口配置信息一直出现配置失败
- 微信小程序商城后台修改商城配置信息提示“上传目录Data/UploadFiles不存在请手动创建”
- 微信支付配置信息,JSAPI接口,H5调用微信js接口支付,微信公众号支付
- (基于nodejs)微信测试号(接口配置信息)验证服务器的URL
- 微信接口配置信息总是配置失败
- 微信修改基本配置信息
- 微信公众开发接入服务器的接口配置信息
- 微信支付配置信息,JSAPI接口,H5调用微信js接口支付,微信公众号支付
- 阿里云+python 验证微信接口配置信息
- php微信开发 接口配置信息 如何代码实现,代码实现,入口文件 token 配置失败
- 刚想起 微信修改基本配置信息
- 微信接口开发之高级篇系列【网页授权获取用户基本信息】
- 微信公众帐号开发教程第3篇-开发模式启用及接口配置
- Java Properties 类读取和修改配置文件信息
- 【视频】配置信息管理 的 使用方法(三):查看和修改元数据、查看数据库的表视图存储过程等信息
- 微信测试帐号,接口配置验证不通过
- 微信JS SDK配置授权,实现分享接口
- 网卡配置和DNS配置,手动挂在nas存储的共享目录,网络相关其它操作命令,修改防火墙中的端口配置,resolv.conf配置详细介绍和网卡信息配置详细介绍
- 微信获取用户信息的两个接口和两个ACCESS_TOKEN
- 修改配置文件信息