0.使用模拟数据进行充值和提现
1.优化提现接口/api/finance/withdrawCreate 2.优化充值接口/api/finance/depositCreate
This commit is contained in:
@@ -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>
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user