This commit is contained in:
@@ -40,8 +40,7 @@ export interface H5PopupConfiguration {
|
||||
starts_at: string // 生效开始时间(ISO 8601)
|
||||
ends_at: string // 生效结束时间(ISO 8601)
|
||||
version: number // 配置版本,每次更新递增;版本参与频率去重,旧版本通知保留原快照
|
||||
creator: number // 创建人账号ID
|
||||
updater: number // 最近更新人账号ID
|
||||
creator_name: string // 创建人名称
|
||||
created_at: string // 创建时间(ISO 8601)
|
||||
updated_at: string // 最近更新时间(ISO 8601);启停同样刷新该时间
|
||||
}
|
||||
|
||||
@@ -307,6 +307,7 @@ export function buildPaymentCredentials(
|
||||
): PaymentCredentialValidationResult {
|
||||
const spec = getPaymentCredentialFieldSpec(providerType)
|
||||
const allowedKeys = [...spec.required, ...spec.optional]
|
||||
const optionalKeys = new Set(spec.optional)
|
||||
const credentials: Record<string, PaymentCredentialValue> = {}
|
||||
|
||||
for (const entry of entries) {
|
||||
@@ -318,6 +319,7 @@ export function buildPaymentCredentials(
|
||||
return { credentials: null, error: `凭证字段 ${key} 不属于当前服务商支持的字段` }
|
||||
}
|
||||
if (!entry.value) {
|
||||
if (optionalKeys.has(key)) continue
|
||||
return { credentials: null, error: `请填写凭证字段 ${key} 的值` }
|
||||
}
|
||||
if (Object.prototype.hasOwnProperty.call(credentials, key)) {
|
||||
|
||||
Reference in New Issue
Block a user