Kaynağa Gözat

modify wxauthor callback url

stanley-king 8 yıl önce
ebeveyn
işleme
275a610e87

+ 1 - 1
helper/fcgi_server.php

@@ -21,7 +21,7 @@ class fcgi_server
     private function is_exclude($file)
     {
         static $exfiles = array('wxnotify.php','alipay_notify_url.php','dispatch_notify.php','kdniao_notify.php',
-            'cmbpay_notify.php','cmbpay_sign.php','api/wxLogin/index.php','api/wxLogin/callback.php',
+            'cmbpay_notify.php','cmbpay_sign.php','wxauthor.php',
             'test.php');
 
         $path = BASE_ROOT_PATH . '/mobile/';

+ 1 - 1
helper/third_author/wxauthor.php

@@ -33,7 +33,7 @@ class wxauthor
 
     public function enter()
     {
-        $back_url = BASE_SITE_URL . '/mobile/index.php?act=third_author&op=wxcb';
+        $back_url = BASE_SITE_URL . '/mobile/wxauthor.php';
         $params = ['appid' => self::appid,
             'redirect_uri' => urlencode($back_url),
             'response_type' => 'code',

+ 22 - 0
mobile/wxauthor.php

@@ -0,0 +1,22 @@
+<?php
+/**
+ * Created by PhpStorm.
+ * User: stanley-king
+ * Date: 2017/4/26
+ * Time: 下午2:46
+ */
+
+require_once (BASE_ROOT_PATH . '/helper/third_author/wxauthor.php');
+
+ini_set('date.timezone','Asia/Shanghai');
+error_reporting(E_ERROR);
+
+$code = $_GET['code'];
+if(empty($code)) {
+
+}
+else
+{
+    $author = new \thrid_author\wxauthor();
+    $author->callback($code);
+}