From 0594758a027d38e356ff27b6e447f58496c80340 Mon Sep 17 00:00:00 2001 From: elf <360197197@qq.com> Date: Mon, 7 Aug 2023 23:31:58 +0800 Subject: [PATCH] yh --- app/Controller/Payment/ReturnController.php | 2 +- config/routes.php | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Controller/Payment/ReturnController.php b/app/Controller/Payment/ReturnController.php index d2b537a..76b7e42 100644 --- a/app/Controller/Payment/ReturnController.php +++ b/app/Controller/Payment/ReturnController.php @@ -22,6 +22,6 @@ class ReturnController extends AbstractController { $token = $request->route('token'); $requestLog = $this->requestService->getRequestLogByToken($token); - return $response->redirect($requestLog->getDataValue('return_url')); + return $response->redirect($requestLog->getDataValue('returnUrl')); } } diff --git a/config/routes.php b/config/routes.php index d8c4f3a..7cf79c9 100644 --- a/config/routes.php +++ b/config/routes.php @@ -4,6 +4,7 @@ declare(strict_types=1); use App\Controller\Payment\NotifyController; use App\Controller\Payment\PayController; +use App\Controller\Payment\ReturnController; use Hyperf\HttpServer\Router\Router; Router::get('/favicon.ico', function () { @@ -31,3 +32,6 @@ Router::addGroup('/notify',function () { Router::addRoute(['GET', 'POST'], '/refund/{token}', [NotifyController::class, 'refund']); }); +Router::addRoute(['GET', 'POST'], '/return/{token}', [ReturnController::class, 'go']); + +