mirror of
				https://gitee.com/technical-laohu/mpay.git
				synced 2025-11-04 08:43:42 +08:00 
			
		
		
		
	后台添加支付测试功能
This commit is contained in:
		@@ -6,6 +6,7 @@ namespace app\controller;
 | 
			
		||||
 | 
			
		||||
use app\BaseController;
 | 
			
		||||
use app\model\Order;
 | 
			
		||||
use app\model\User;
 | 
			
		||||
use think\facade\View;
 | 
			
		||||
 | 
			
		||||
class OrderController extends BaseController
 | 
			
		||||
@@ -27,4 +28,18 @@ class OrderController extends BaseController
 | 
			
		||||
            return '订单不存在';
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
    public function testPay()
 | 
			
		||||
    {
 | 
			
		||||
        $pid = 1000;
 | 
			
		||||
        if (session('?pid')) {
 | 
			
		||||
            $pid = session('pid');
 | 
			
		||||
        }
 | 
			
		||||
        View::assign('pid', $pid);
 | 
			
		||||
        $key = User::where('pid', $pid)->where('state', 1)->value('secret_key');
 | 
			
		||||
        if (!$key) {
 | 
			
		||||
            return '用户禁用或不存在';
 | 
			
		||||
        }
 | 
			
		||||
        View::assign('key', $key);
 | 
			
		||||
        return View::fetch();
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user