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