1.新增获取充值/提现配置接口/api/finance/depositWithdrawConfig
2.优化充值和提现方式
This commit is contained in:
@@ -353,10 +353,10 @@ final class FinanceCashierConfig
|
||||
$seenCodes[$code] = true;
|
||||
$dep = $row['deposit_coins_per_fiat'] ?? '';
|
||||
$wdr = $row['withdraw_coins_per_fiat'] ?? '';
|
||||
if (!is_string($dep) || $dep === '' || !is_numeric($dep) || bccomp($dep, '0', 8) <= 0) {
|
||||
if (!is_string($dep) || $dep === '' || !is_numeric($dep) || bccomp($dep, '0', 2) <= 0) {
|
||||
throw new InvalidArgumentException('第 ' . ($idx + 1) . ' 行:充值汇率须为大于 0 的数字');
|
||||
}
|
||||
if (!is_string($wdr) || $wdr === '' || !is_numeric($wdr) || bccomp($wdr, '0', 8) <= 0) {
|
||||
if (!is_string($wdr) || $wdr === '' || !is_numeric($wdr) || bccomp($wdr, '0', 2) <= 0) {
|
||||
throw new InvalidArgumentException('第 ' . ($idx + 1) . ' 行:提现汇率须为大于 0 的数字');
|
||||
}
|
||||
}
|
||||
@@ -379,7 +379,7 @@ final class FinanceCashierConfig
|
||||
if (isset($p['withdraw_limits']) && is_array($p['withdraw_limits'])) {
|
||||
foreach (['min_ewallet', 'min_bank'] as $k) {
|
||||
$v = $p['withdraw_limits'][$k] ?? '0';
|
||||
if (!is_string($v) || !is_numeric($v) || bccomp($v, '0', 4) < 0) {
|
||||
if (!is_string($v) || !is_numeric($v) || bccomp($v, '0', 2) < 0) {
|
||||
throw new InvalidArgumentException('提现最低限额须为不小于 0 的数字');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user