0.使用模拟数据进行充值和提现

1.优化提现接口/api/finance/withdrawCreate
2.优化充值接口/api/finance/depositCreate
This commit is contained in:
2026-05-20 15:57:19 +08:00
parent b9e4d806f7
commit 1b8d947f97
25 changed files with 2022 additions and 179 deletions

View File

@@ -48,6 +48,30 @@ final class DDPayGateway
return $scheme . '://' . $host;
}
/**
* 是否已配置 DDPay 入金所需项(未配置时不应调用三方接口)
*/
public static function isConfigured(): bool
{
$envMap = [
'ddpay_client_id' => 'DDPAY_CLIENT_ID',
'ddpay_identifier' => 'DDPAY_IDENTIFIER',
'ddpay_api_secret' => 'DDPAY_API_SECRET',
'ddpay_deposit_init_url' => 'DDPAY_DEPOSIT_INIT_URL',
];
foreach ($envMap as $cfgKey => $envKey) {
$v = getenv($envKey);
if (!is_string($v) || trim($v) === '') {
$cfg = config('app.' . $cfgKey, '');
if (!is_string($cfg) || trim($cfg) === '') {
return false;
}
}
}
return true;
}
/**
* @return array<string, mixed>
*/