I'm getting the "Configuration Failed" pop up after submitting my URL and Token in the WeChat sandbox environment. Could anyone suggest ways to debug or find a solution? Here are the details:
<?php $data[] = 'Test123'; $data[] = $_GET['timestamp']; $data[] = $_GET['nonce']; asort($data); $strData = ''; $d = ''; $authString = ''; foreach($data as $d){ $authString .= $d; } //verify the signture if(sha1($authString) == $_GET[signature]){ //check if the echostr if(!empty($_GET['echostr'])){ echo $_GET['echostr']; die(); }else{ //logic goes here $return = '<xml> <ToUserName><![CDATA['.$toUser.']]></ToUserName> <FromUserName><![CDATA['.$fromUser.']]></FromUserName> <CreateTime>'.time().'</CreateTime> <MsgType><![CDATA[text]]></MsgType> <Content><![CDATA['.$text.']]></Content> <FuncFlag>0</FuncFlag> </xml>'; echo $return; } }else{ die('You are not supposed to be here'); } ?>
The code itself comes straight from the WeChat Docs or the Youtube Video. Please let me know if I could provide any additional information.
Any advice, tips or hints would be really appreciated.
Please check. The sandbox environment was broken for International. This should be resolved now. Please test again