<?php require_once "config.php"; /** * wechat php test */ //define your token define("TOKEN", "woijodsj23232jdofijweo323ioj"); $wechatObj = new wechatCallbackapiTest(); //$wechatObj->valid(); $wechatObj->setAppid($appid, $secret); $wechatObj->responseMsg(); class wechatCallbackapiTest { private $appid; private $secret; public function setAppid($appid, $secret) { $this->appid = $appid; $this->secret = $secret; } public function valid() { $echoStr = $_GET["echostr"]; //valid signature , option if ($this->checkSignature()) { echo $echoStr; exit; } } public function responseMsg()