根据对接实施方案文档修改
This commit is contained in:
26
config/playx.php
Normal file
26
config/playx.php
Normal file
@@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* PlayX 积分商城对接配置
|
||||
*/
|
||||
return [
|
||||
// 返还比例:新增保障金 = ABS(yesterday_win_loss_net) * 返还比例(仅亏损时)
|
||||
'return_ratio' => floatval(env('PLAYX_RETURN_RATIO', '0.1')),
|
||||
// 解锁比例:今日可领取上限 = yesterday_total_deposit * 解锁比例
|
||||
'unlock_ratio' => floatval(env('PLAYX_UNLOCK_RATIO', '0.1')),
|
||||
// 提现折算:积分 → 现金(如 10 分 = 1 元)
|
||||
'points_to_cash_ratio' => floatval(env('PLAYX_POINTS_TO_CASH_RATIO', '0.1')),
|
||||
// Daily Push 签名校验(PlayX 调用商城时使用)
|
||||
'daily_push_secret' => strval(env('PLAYX_DAILY_PUSH_SECRET', '')),
|
||||
// token 会话缓存过期时间(秒)
|
||||
'session_expire_seconds' => intval(env('PLAYX_SESSION_EXPIRE_SECONDS', '3600')),
|
||||
// PlayX API 配置(商城调用 PlayX 时使用)
|
||||
'api' => [
|
||||
'base_url' => strval(env('PLAYX_API_BASE_URL', '')),
|
||||
'secret_key' => strval(env('PLAYX_API_SECRET_KEY', '')),
|
||||
'token_verify_url' => '/api/v1/auth/verify-token',
|
||||
'bonus_grant_url' => '/api/v1/bonus/grant',
|
||||
'balance_credit_url' => '/api/v1/balance/credit',
|
||||
'transaction_status_url' => '/api/v1/transaction/status',
|
||||
],
|
||||
];
|
||||
@@ -59,4 +59,10 @@ return [
|
||||
]
|
||||
]
|
||||
]
|
||||
,
|
||||
// PlayX 闭环任务:轮询交易终态/失败重试
|
||||
'playx_jobs' => [
|
||||
'handler' => app\process\PlayxJobs::class,
|
||||
'reloadable' => false,
|
||||
],
|
||||
];
|
||||
|
||||
@@ -111,6 +111,17 @@ Route::post('/api/ems/send', [\app\api\controller\Ems::class, 'send']);
|
||||
// api/v1 鉴权
|
||||
Route::get('/api/v1/authToken', [\app\api\controller\v1\Auth::class, 'authToken']);
|
||||
|
||||
// api/v1 PlayX 积分商城
|
||||
Route::post('/api/v1/playx/daily-push', [\app\api\controller\v1\Playx::class, 'dailyPush']);
|
||||
Route::post('/api/v1/playx/verify-token', [\app\api\controller\v1\Playx::class, 'verifyToken']);
|
||||
Route::get('/api/v1/playx/assets', [\app\api\controller\v1\Playx::class, 'assets']);
|
||||
Route::post('/api/v1/playx/claim', [\app\api\controller\v1\Playx::class, 'claim']);
|
||||
Route::get('/api/v1/playx/items', [\app\api\controller\v1\Playx::class, 'items']);
|
||||
Route::post('/api/v1/playx/bonus/redeem', [\app\api\controller\v1\Playx::class, 'bonusRedeem']);
|
||||
Route::post('/api/v1/playx/physical/redeem', [\app\api\controller\v1\Playx::class, 'physicalRedeem']);
|
||||
Route::post('/api/v1/playx/withdraw/apply', [\app\api\controller\v1\Playx::class, 'withdrawApply']);
|
||||
Route::get('/api/v1/playx/orders', [\app\api\controller\v1\Playx::class, 'orders']);
|
||||
|
||||
// ==================== Admin 路由 ====================
|
||||
// Admin 多为 JSON API,前端可能用 GET 传参查列表、POST 提交表单,使用 any 确保兼容
|
||||
|
||||
|
||||
Reference in New Issue
Block a user