From b1f3ad4ecfc8a39b897fe7bfebce7714b69ec5d1 Mon Sep 17 00:00:00 2001 From: yangrz Date: Mon, 22 Aug 2022 21:00:40 +0800 Subject: [PATCH] =?UTF-8?q?CCB=E5=9B=9E=E8=B0=83=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ...NotifyController.php => CcbNotifyController.php} | 2 +- config/routes.php | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) rename app/Controller/v3/{CCBNotifyController.php => CcbNotifyController.php} (97%) diff --git a/app/Controller/v3/CCBNotifyController.php b/app/Controller/v3/CcbNotifyController.php similarity index 97% rename from app/Controller/v3/CCBNotifyController.php rename to app/Controller/v3/CcbNotifyController.php index a2312e1..b1da104 100644 --- a/app/Controller/v3/CCBNotifyController.php +++ b/app/Controller/v3/CcbNotifyController.php @@ -5,7 +5,7 @@ namespace App\Controller\v3; use App\Controller\BaseController; use Hyperf\Logger\LoggerFactory; -class CCBNotifyController extends BaseController +class CcbNotifyController extends BaseController { /** * @var \Psr\Log\LoggerInterface diff --git a/config/routes.php b/config/routes.php index 0402048..29d9ce3 100644 --- a/config/routes.php +++ b/config/routes.php @@ -10,6 +10,7 @@ declare(strict_types=1); * @license https://github.com/hyperf/hyperf/blob/master/LICENSE */ +use App\Controller\v3\CcbNotifyController; use App\Controller\v3\SfExpressController; use Hyperf\HttpServer\Router\Router; @@ -201,10 +202,10 @@ Router::addGroup('/v3/sf_express/', function () { // 建行支付回调 Router::addGroup('/v3/ccb/',function () { - Router::post('notify/pay', 'App\Controller\v3\CCBNotifyController@pay'); - Router::post('notify/refund', 'App\Controller\v3\NotifyController@refund'); - Router::post('notify/merchant', 'App\Controller\v3\NotifyController@merchant'); - Router::post('notify/accounting', 'App\Controller\v3\NotifyController@accounting'); - Router::post('notify/bill', 'App\Controller\v3\NotifyController@bill'); - Router::post('notify/platform', 'App\Controller\v3\NotifyController@platform'); + Router::post('notify/pay', [CcbNotifyController::class, 'pay']); + Router::post('notify/refund', [CcbNotifyController::class, 'refund']); + Router::post('notify/merchant', [CcbNotifyController::class, 'merchant']); + Router::post('notify/accounting', [CcbNotifyController::class, 'accounting']); + Router::post('notify/bill', [CcbNotifyController::class, 'bill']); + Router::post('notify/platform', [CcbNotifyController::class, 'platform']); }); \ No newline at end of file