Browse Source

公众号支付

lizhen_gitee 3 years ago
parent
commit
57001d627a
2 changed files with 4 additions and 4 deletions
  1. 1 1
      addons/epay/config.php
  2. 3 3
      addons/epay/library/Wechat.php

+ 1 - 1
addons/epay/config.php

@@ -9,7 +9,7 @@ return [
         'value' => [
             'appid' => 'wx69fb4525c9156250',
             'app_id' => 'wx1aded5599770e18a',
-            'app_secret' => '50672a30e50a0a0af2f4d64eaebedc06',
+            'app_secret' => '70f8aa352f396ac488f839bb77a9200f',
             'miniapp_id' => '',
             'mch_id' => '1618172696',
             'key' => 'changlaikejimiyao20180508jiushib',

+ 3 - 3
addons/epay/library/Wechat.php

@@ -51,8 +51,8 @@ class Wechat
                 Header("Location: $url");
                 exit();
             } else {
-                $state = Session::get('state');
-                if ($state == $_GET['state']) {
+                /*$state = Session::get('state');
+                if ($state == $_GET['state']) {*/
                     $code = $_GET['code'];
                     $token = $this->getAccessToken($code);
                     if (!isset($token['openid']) && isset($token['errmsg'])) {
@@ -62,7 +62,7 @@ class Wechat
                     if ($openid) {
                         Session::set("openid", $openid);
                     }
-                }
+               /* }*/
             }
         }
         return $openid;