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);