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']); + +