From 8550511f8c6d07ce1f792941ff0c00816c60fd37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?D=2E=20Nagy=20Gerg=C5=91?= Date: Sun, 14 Jan 2024 16:45:39 +0100 Subject: [PATCH] fixes --- src/Gateway/Driver.php | 4 ++-- src/Gateway/Response.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Gateway/Driver.php b/src/Gateway/Driver.php index 0c44b9c5..22cd50c3 100644 --- a/src/Gateway/Driver.php +++ b/src/Gateway/Driver.php @@ -66,7 +66,7 @@ public function getCaptureUrl(Order $order): string */ public function getSuccessUrl(Order $order): string { - return str_replace(['{order}'], [$order->uuid], $this->config['success_url'] ?? '/'); + return URL::to(str_replace(['{order}'], [$order->uuid], $this->config['success_url'] ?? '/')); } /** @@ -74,7 +74,7 @@ public function getSuccessUrl(Order $order): string */ public function getFailureUrl(Order $order): string { - return str_replace(['{order}'], [$order->uuid], $this->config['failure_url'] ?? '/'); + return URL::to(str_replace(['{order}'], [$order->uuid], $this->config['failure_url'] ?? '/')); } /** diff --git a/src/Gateway/Response.php b/src/Gateway/Response.php index e5aa6fdf..604a1d2f 100644 --- a/src/Gateway/Response.php +++ b/src/Gateway/Response.php @@ -86,6 +86,6 @@ public function toResponse($request): BaseResponse new JsonResponse($this->toArray()); } - new RedirectResponse($this->url); + return new RedirectResponse($this->url); } }