From e82854dd1a78fde84994907e1c19bc0237383e65 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Viktor=20Sz=C3=A9pe?= Date: Sun, 14 Jan 2024 19:33:40 +0100 Subject: [PATCH] fix Response::toResponse --- src/Gateway/Response.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Gateway/Response.php b/src/Gateway/Response.php index 604a1d2f..224a7515 100644 --- a/src/Gateway/Response.php +++ b/src/Gateway/Response.php @@ -83,7 +83,7 @@ public function toResponse($request): BaseResponse if (! is_null($this->responseResolver)) { return call_user_func_array($this->responseResolver, [$this->url, $this->data]); } elseif ($request->wantsJson()) { - new JsonResponse($this->toArray()); + return new JsonResponse($this->toArray()); } return new RedirectResponse($this->url);