You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
1.8 KiB
PHP
38 lines
1.8 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use App\Controller\Payment\NotifyController;
|
|
use App\Controller\Payment\PaymentController;
|
|
use App\Controller\Payment\ReturnController;
|
|
use Hyperf\HttpServer\Router\Router;
|
|
|
|
Router::get('/favicon.ico', function () {
|
|
return 'abc';
|
|
});
|
|
|
|
Router::addGroup('/payment',function () {
|
|
Router::post('/company-register', [PaymentController::class, 'companyRegister']);
|
|
Router::post('/register', [PaymentController::class, 'register']);
|
|
Router::post('/bind-card', [PaymentController::class, 'bindCard']);
|
|
Router::post('/unbind-card', [PaymentController::class, 'unbindCard']);
|
|
Router::post('/pwd-forget', [PaymentController::class, 'pwdForget']);
|
|
Router::post('/pwd-modify', [PaymentController::class, 'pwdModify']);
|
|
Router::post('/payment', [PaymentController::class, 'payment']);
|
|
Router::post('/refund-apply', [PaymentController::class, 'refundApply']);
|
|
Router::post('/refund-confirm', [PaymentController::class, 'refundConfirm']);
|
|
Router::post('/refund-cancel', [PaymentController::class, 'refundCancel']);
|
|
}, ['middleware' => [\App\Middleware\RequestLogMiddleware::class, \App\Middleware\AppAuthMiddleWare::class]]);
|
|
|
|
Router::addGroup('/notify',function () {
|
|
Router::addRoute(['GET', 'POST'], '/register/{token}', [NotifyController::class, 'register']);
|
|
Router::addRoute(['GET', 'POST'], '/bind-card/{token}', [NotifyController::class, 'bindCard']);
|
|
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'], '/return/{token}', [ReturnController::class, 'go']);
|
|
|
|
|