From 03a9fc8faad6ceacc0ba2faabfe71c1da0e16908 Mon Sep 17 00:00:00 2001 From: hellcat <> Date: Sat, 28 Jun 2025 20:11:55 +0800 Subject: [PATCH] no message --- app/routes.php | 9 +++++---- src/Services/Gateway/Epay.php | 10 +--------- 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/app/routes.php b/app/routes.php index ed087ad4..887b5f90 100755 --- a/app/routes.php +++ b/app/routes.php @@ -72,11 +72,12 @@ return static function (Slim\App $app): void { }); // front - $app->get('/', App\Controllers\FrontController::class . ':index'); +// $app->get('/', App\Controllers\FrontController::class . ':index'); // 老实 + $app->get('/', App\Controllers\AuthController::class . ':login'); $app->get('/code/{code}', App\Controllers\FrontController::class . ':index'); - $app->get('/sales', App\Controllers\FrontController::class . ':sales'); - $app->get('/aff', App\Controllers\FrontController::class . ':aff'); - $app->get('/faq', App\Controllers\FrontController::class . ':faq'); +// $app->get('/sales', App\Controllers\FrontController::class . ':sales'); +// $app->get('/aff', App\Controllers\FrontController::class . ':aff'); +// $app->get('/faq', App\Controllers\FrontController::class . ':faq'); // Home // $app->get('/', App\Controllers\HomeController::class . ':index'); diff --git a/src/Services/Gateway/Epay.php b/src/Services/Gateway/Epay.php index eef4133a..7c8eb7b2 100755 --- a/src/Services/Gateway/Epay.php +++ b/src/Services/Gateway/Epay.php @@ -62,10 +62,6 @@ final class Epay extends Base public function purchase(ServerRequest $request, Response $response, array $args): ResponseInterface { -// return $response->withJson([ -// 'ret' => 0, -// 'msg' => '请求支付失败,请联系管理员', -// ]); $price = $this->antiXss->xss_clean($request->getParam('price')); $invoice_id = $this->antiXss->xss_clean($request->getParam('invoice_id')); // EPay 特定参数 @@ -114,8 +110,7 @@ final class Epay extends Base $data['sign'] = $epaySubmit->buildRequestMysign(EpayTool::argSort($data)); $data['sign_type'] = $this->epay['sign_type']; $client = new Client(); -// var_dump($this->epay['apiurl']); -// exit; + try { $res = $client->request('POST', $this->epay['apiurl'] . 'mapi.php', ['form_params' => $data]); @@ -138,9 +133,6 @@ final class Epay extends Base } } -// var_dump($resData); -// exit; - return $response->withHeader('HX-Redirect', $resData['payurl'])->withJson([ 'ret' => 1, 'msg' => '订单发起成功,正在跳转到支付页面...',