1.优化充值跳转链接的问题
This commit is contained in:
@@ -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
|
||||
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user