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, '&');