diff --git a/app/Controller/Payment/PaymentController.php b/app/Controller/Payment/PaymentController.php index 66747d6..b68742c 100644 --- a/app/Controller/Payment/PaymentController.php +++ b/app/Controller/Payment/PaymentController.php @@ -87,24 +87,31 @@ class PaymentController extends AbstractController return $this->success(['acsNo' => $acsNo]); } + public function confirmPay(RequestInterface $request) + { + [$app, $data, $token] = $this->parseReqest($request, UnbindCardRequest::class); + $data = $this->paymentService->confirmPay($data, $app, $token); + return $this->success($data); + } + public function refundApply(RequestInterface $request) { [$app, $data, $token] = $this->parseReqest($request, UnbindCardRequest::class); - $data = $this->paymentService->refundApply($app, $data); + $data = $this->paymentService->refundApply($data, $app); return $this->success($data); } public function refundConfirm(RequestInterface $request) { [$app, $data, $token] = $this->parseReqest($request, UnbindCardRequest::class); - $this->paymentService->refundConfirm($app, $data, $token); + $this->paymentService->refundConfirm($data, $app, $token); return $this->success(); } public function refundCancel(RequestInterface $request) { [$app, $data, $token] = $this->parseReqest($request, UnbindCardRequest::class); - $data = $this->paymentService->refundApply($app, $data); + $data = $this->paymentService->refundApply($data, $app); return $this->success($data); } diff --git a/config/routes.php b/config/routes.php index d746925..2da0610 100644 --- a/config/routes.php +++ b/config/routes.php @@ -19,6 +19,7 @@ Router::addGroup('/payment',function () { Router::post('/pwd-forget', [PaymentController::class, 'pwdForget']); Router::post('/pwd-modify', [PaymentController::class, 'pwdModify']); Router::post('/payment', [PaymentController::class, 'payment']); + Router::post('/confirm-pay', [PaymentController::class, 'payment']); Router::post('/transfer-pay', [PaymentController::class, 'transferPay']); Router::post('/query-bind-cards', [PaymentController::class, 'queryBindCards']); Router::post('/query-user', [PaymentController::class, 'queryUser']);