From 6d34a1da9227172b21ec38c471880321da3270fa Mon Sep 17 00:00:00 2001 From: ljl Date: Tue, 22 Aug 2023 13:27:32 +0800 Subject: [PATCH] yh --- app/Controller/Payment/NotifyController.php | 2 +- app/Controller/Payment/PaymentController.php | 4 ++-- config/routes.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Controller/Payment/NotifyController.php b/app/Controller/Payment/NotifyController.php index b4d1576..7eef4ce 100644 --- a/app/Controller/Payment/NotifyController.php +++ b/app/Controller/Payment/NotifyController.php @@ -110,7 +110,7 @@ class NotifyController extends AbstractController 'transaction_id' => $params['transactionId'] ?? '', 'out_transaction_id' => $params['outTransactionId'] ?? '', ]; - $order = $this->paymentService->updateOrder($info, ['APPLY_SUCCESS', 'PROCESS']); + $order = $this->paymentService->updateOrder($info, ['APPLY_SUCCESS', 'PROCESS', 'CONFIRM_SUCCESS']); if (empty($order)) { return $baofu->notifySuccess(); } diff --git a/app/Controller/Payment/PaymentController.php b/app/Controller/Payment/PaymentController.php index fb4b02f..240723a 100644 --- a/app/Controller/Payment/PaymentController.php +++ b/app/Controller/Payment/PaymentController.php @@ -90,8 +90,8 @@ class PaymentController extends AbstractController public function confirmPay(RequestInterface $request) { [$app, $data, $token] = $this->parseReqest($request, UnbindCardRequest::class); - $data = $this->paymentService->confirmPay($data, $app, $token); - return $this->success($data); + $result = $this->paymentService->confirmPay($data, $app, $token); + return $this->success(['result' => $result]); } public function refundApply(RequestInterface $request) diff --git a/config/routes.php b/config/routes.php index bc0346a..4b8c73f 100644 --- a/config/routes.php +++ b/config/routes.php @@ -35,7 +35,7 @@ Router::addGroup('/notify',function () { Router::addRoute(['GET', 'POST'], '/payment/{token}', [NotifyController::class, 'payment']); Router::addRoute(['GET', 'POST'], '/refund/{token}', [NotifyController::class, 'refund']); Router::addRoute(['POST'], '/test-notify', [NotifyController::class, 'testNotify']); - Router::addRoute(['GET', 'POST'], '/confirm-assure-portfolio-pay', [NotifyController::class, 'confirmAssurePortfolioPay']); + Router::addRoute(['GET', 'POST'], '/confirm-assure-portfolio-pay/{token}', [NotifyController::class, 'confirmAssurePortfolioPay']); }); Router::addRoute(['GET', 'POST'], '/return/{token}', [ReturnController::class, 'go']);