|
|
|
<?php
|
|
|
|
|
|
|
|
declare(strict_types=1);
|
|
|
|
|
|
|
|
use App\Controller\Payment\NotifyController;
|
|
|
|
use App\Controller\Payment\PayController;
|
|
|
|
use App\Controller\Recharge\RechargeController;
|
|
|
|
use Hyperf\HttpServer\Router\Router;
|
|
|
|
|
|
|
|
Router::get('/favicon.ico', function () {
|
|
|
|
return 'sdfsd';
|
|
|
|
});
|
|
|
|
|
|
|
|
Router::addGroup('/payment',function () {
|
|
|
|
Router::post('/register', [PayController::class, 'register']);
|
|
|
|
Router::post('/refund', [PayController::class, 'refund']);
|
|
|
|
Router::post('/bind-card', [PayController::class, 'bindCard']);
|
|
|
|
Router::post('/bind-card-confirm', [PayController::class, 'bindCardConfirm']);
|
|
|
|
Router::post('/un-bind-card', [PayController::class, 'unBindCard']);
|
|
|
|
Router::post('/protocol-pay-pre-request', [PayController::class, 'protocolPayPreRequest']);
|
|
|
|
Router::post('/protocol-pay-confirm', [PayController::class, 'protocolPayConfirm']);
|
|
|
|
Router::post('/refund-query', [PayController::class, 'refundQuery']);
|
|
|
|
Router::post('/payment-query', [PayController::class, 'paymentQuery']);
|
|
|
|
Router::post('/pay', [PayController::class, 'payment']);
|
|
|
|
}, ['middleware' => [\App\Middleware\RequestLogMiddleware::class]]);
|
|
|
|
|
|
|
|
Router::addGroup('/recharge',function () {
|
|
|
|
Router::post('/recharge', [RechargeController::class, 'recharge']);
|
|
|
|
Router::post('/confirm-bind-card', [RechargeController::class, 'confirmBindCard']);
|
|
|
|
Router::post('/confirm-pay', [RechargeController::class, 'confirmPay']);
|
|
|
|
Router::post('/orders', [RechargeController::class, 'orders']);
|
|
|
|
Router::post('/login', [RechargeController::class, 'login']);
|
|
|
|
Router::post('/get-member-info', [RechargeController::class, 'getMemberInfo']);
|
|
|
|
});
|
|
|
|
|
|
|
|
Router::addGroup('/notify',function () {
|
|
|
|
Router::addRoute(['GET', 'POST'], '/payment', [NotifyController::class, 'payment']);
|
|
|
|
Router::addRoute(['GET', 'POST'], '/refund', [NotifyController::class, 'refund']);
|
|
|
|
});
|
|
|
|
|