fix(waffo): filter waffo from generic payment selector, avoid duplicate buttons

When only Waffo was enabled, the generic payment method list showed a
"Waffo (Global Payment)" button calling preTopUp (epay flow) instead of
waffoTopUp, while the dedicated "Waffo 充值" section had the correct buttons.

Fix: filter waffo entries from generic list and hide the "选择支付方式"
column when no non-waffo methods exist.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
zhongyuan.zhao
2026-03-18 16:18:13 +08:00
parent 1daeac42ef
commit 669e596ff7

View File

@@ -291,11 +291,11 @@ const RechargeCard = ({
style={{ width: '100%' }}
/>
</Col>
{payMethods && payMethods.filter(m => m.type !== 'waffo').length > 0 && (
<Col xs={24} sm={24} md={24} lg={14} xl={14}>
<Form.Slot label={t('选择支付方式')}>
{payMethods && payMethods.length > 0 ? (
<Space wrap>
{payMethods.map((payMethod) => {
{payMethods.filter(m => m.type !== 'waffo').map((payMethod) => {
const minTopupVal = Number(payMethod.min_topup) || 0;
const isStripe = payMethod.type === 'stripe';
const disabled =
@@ -355,13 +355,9 @@ const RechargeCard = ({
);
})}
</Space>
) : (
<div className='text-gray-500 text-sm p-3 bg-gray-50 rounded-lg border border-dashed border-gray-300'>
{t('暂无可用的支付方式,请联系管理员配置')}
</div>
)}
</Form.Slot>
</Col>
)}
</Row>
)}