shish 6 anni fa
parent
commit
e967eb8734
1 ha cambiato i file con 3 aggiunte e 5 eliminazioni
  1. 3 5
      app/saas/controllers/WxOpenController.php

+ 3 - 5
app/saas/controllers/WxOpenController.php

@@ -360,9 +360,6 @@ class WxOpenController extends PublicController
 
     public function actionApi()
     {
-
-        Yii::warning("aadasdfa <br /> adfasdf \n asdfasdfas");
-
         $openData = file_get_contents('php://input');
         if (isset ($openData) == false || empty($openData)) {
             util::stop('has no post data');
@@ -376,6 +373,7 @@ class WxOpenController extends PublicController
         $encodingAesKey = $open['aesKey'];
         $token = $open['token'];
         $appId = $open['appId'];
+        $appSecret = $open['appSecret'];
         $signature = isset($get['signature']) ? $get['signature'] : '';
         $timestamp = isset($get['timestamp']) ? $get['timestamp'] : '';
         $nonce = isset($get['nonce']) ? $get['nonce'] : '';
@@ -388,8 +386,8 @@ class WxOpenController extends PublicController
         $format = "<xml><ToUserName><![CDATA[toUser]]></ToUserName><Encrypt><![CDATA[%s]]></Encrypt></xml>";
         $from_xml = sprintf($format, $encrypt);
 
-        $formString = 'token:' . $token . " encodingAesKey:" . $encodingAesKey . ' 3:' . $appId . ' 4:' . $msg_signature . ' 5:' . $timestamp . ' 6:' . $nonce . ' 7:' . $from_xml;
-        Yii::warning("formString:" . $formString);
+        $formString = "token:" . $token . " \n encodingAesKey:" . $encodingAesKey . " \n appId:" . $appId . " \n msg_signature:" . $msg_signature . " \n appSecret:" . $appSecret . " \n timestamp:" . $timestamp . " \n nonce:" . $nonce . " \n from_xml:" . $from_xml;
+        Yii::warning($formString);
 
         //第三方收到公众号平台发送的消息
         $pc = new \WXBizMsgCrypt($token, $encodingAesKey, $appId);