|
@@ -14,12 +14,12 @@ async function getPaymentMethods() {
|
|
|
defaultValue: { methods: DEFAULT_PAYMENT_METHODS }
|
|
defaultValue: { methods: DEFAULT_PAYMENT_METHODS }
|
|
|
})
|
|
})
|
|
|
const methods = paymentConfig?.methods
|
|
const methods = paymentConfig?.methods
|
|
|
- if (!Array.isArray(methods) || methods.length === 0) {
|
|
|
|
|
|
|
+ if (!Array.isArray(methods)) {
|
|
|
return DEFAULT_PAYMENT_METHODS
|
|
return DEFAULT_PAYMENT_METHODS
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
return methods
|
|
return methods
|
|
|
- .filter(method => method && typeof method.type === 'string' && method.type.trim())
|
|
|
|
|
|
|
+ .filter(method => method && method.enabled !== false && typeof method.type === 'string' && method.type.trim())
|
|
|
.map(method => ({
|
|
.map(method => ({
|
|
|
type: method.type.trim(),
|
|
type: method.type.trim(),
|
|
|
name: String(method.name || method.type).trim()
|
|
name: String(method.name || method.type).trim()
|