From b21c0c605f91aca3df7e4dcf7547d493897c4be1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=80=99=E5=AD=A6=E6=9D=B0?= Date: Mon, 12 Mar 2018 19:40:30 +0800 Subject: [PATCH] bug fix --- src/Middleware/InternalApi.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/Middleware/InternalApi.php b/src/Middleware/InternalApi.php index 41f340a..dbd520b 100644 --- a/src/Middleware/InternalApi.php +++ b/src/Middleware/InternalApi.php @@ -9,6 +9,11 @@ use Illuminate\Support\Str; class InternalApi { + public function __construct() + { + app()->configure('internal_api'); + } + /** * Handle an incoming request. * @@ -54,8 +59,7 @@ class InternalApi protected function sign($params) { - $app = $params['appid']; - $key = config('internal_api.server.' . $app); + $key = config('internal_api.server.' . $params['appid']); unset($params['sign']); ksort($params); $str = http_build_query($params, null, '&');