1.优化充值跳转链接的问题

This commit is contained in:
2026-05-30 11:26:41 +08:00
parent 1f9b2c2663
commit 15b9313c07
6 changed files with 121 additions and 7 deletions

View File

@@ -248,6 +248,14 @@ final class MockPay
}
$returnGameUrl = self::resolveGameReturnUrl();
if ($returnGameUrl !== '') {
$query['return_game_url'] = $returnGameUrl;
}
return $htmlBase . '/mock-deposit.html?' . http_build_query($query, '', '&', PHP_QUERY_RFC3986);
@@ -332,6 +340,42 @@ final class MockPay
/**
* 模拟充值完成后「返回游戏」跳转地址H5_GAME_URL
*/
public static function resolveGameReturnUrl(): string
{
$raw = getenv('H5_GAME_URL');
if (is_string($raw) && trim($raw) !== '') {
return trim($raw);
}
$cfg = config('app.h5_game_url', '');
if (is_string($cfg) && trim($cfg) !== '') {
return trim($cfg);
}
return '';
}
private static function linkSecret(): string
{