全栈小学生 1d87b08b07 up
2025-01-03 17:59:22 +08:00

46 lines
1.6 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<?php
// +----------------------------------------------------------------------
// | Niucloud-admin 企业快速开发的多应用管理平台
// +----------------------------------------------------------------------
// | 官方网址https://www.niucloud.com
// +----------------------------------------------------------------------
// | niucloud团队 版权所有 开源版本可自由商用
// +----------------------------------------------------------------------
// | Author: Niucloud Team
// +----------------------------------------------------------------------
use app\api\middleware\ApiChannel;
use app\api\middleware\ApiCheckToken;
use app\api\middleware\ApiLog;
use think\facade\Route;
//支付异步回调
Route::any('pay/notify/:channel/:type/:action', 'pay.Pay/notify')
->middleware(ApiChannel::class)
->middleware(ApiCheckToken::class)
->middleware(ApiLog::class);
/**
* 路由
*/
Route::group('pay',function () {
//找朋友帮忙付支付信息
Route::get('friendspay/info/:trade_type/:trade_id', 'pay.Pay/friendspayInfo');
})->middleware(ApiChannel::class)
->middleware(ApiCheckToken::class)
->middleware(ApiLog::class);
Route::group('pay',function () {
//去支付
Route::post('', 'pay.Pay/pay');
//支付信息
Route::get('info/:trade_type/:trade_id', 'pay.Pay/info');
//获取支付类型
Route::get('type/:trade_type', 'pay.Pay/getPayType');
//支付关闭
Route::post('close', 'pay.Pay/close');
})->middleware(ApiChannel::class)
->middleware(ApiCheckToken::class, true)//表示验证登录
->middleware(ApiLog::class);