From 6676d1f7ca019bc9d550132c4a0f8a2a74bd2914 Mon Sep 17 00:00:00 2001 From: erio Date: Mon, 6 Apr 2026 21:50:54 +0800 Subject: [PATCH] feat(payment): auto-fill callback URLs + complete provider config fields - notifyUrl/returnUrl auto-fill with current domain + webhook path on create - Default paths: /api/v1/payment/webhook/{provider} and /payment/result - Add missing EasyPay config: cid, cidAlipay, cidWxpay (optional channel IDs) - Stripe: show webhook URL hint with copyable endpoint below config - Fields with defaults show placeholder text for reference - Also apply defaults when switching provider type in dialog --- frontend/src/i18n/locales/en.ts | 4 ++ frontend/src/i18n/locales/zh.ts | 4 ++ frontend/src/views/admin/SettingsView.vue | 54 ++++++++++++++++++++--- 3 files changed, 56 insertions(+), 6 deletions(-) diff --git a/frontend/src/i18n/locales/en.ts b/frontend/src/i18n/locales/en.ts index 144ed116c1..e9979a9d2a 100644 --- a/frontend/src/i18n/locales/en.ts +++ b/frontend/src/i18n/locales/en.ts @@ -4372,6 +4372,10 @@ export default { field_secretKey: 'Secret Key', field_publishableKey: 'Publishable Key', field_webhookSecret: 'Webhook Secret', + field_cid: 'Channel ID', + field_cidAlipay: 'Alipay Channel ID', + field_cidWxpay: 'WeChat Channel ID', + stripeWebhookHint: 'Configure the following URL as a Webhook endpoint in Stripe Dashboard:', productNamePrefix: 'Product Name Prefix', productNameSuffix: 'Product Name Suffix', preview: 'Preview', diff --git a/frontend/src/i18n/locales/zh.ts b/frontend/src/i18n/locales/zh.ts index 1252669722..e4b47ca6a8 100644 --- a/frontend/src/i18n/locales/zh.ts +++ b/frontend/src/i18n/locales/zh.ts @@ -4545,6 +4545,10 @@ export default { field_secretKey: '密钥', field_publishableKey: '公开密钥', field_webhookSecret: 'Webhook 密钥', + field_cid: '支付渠道 ID', + field_cidAlipay: '支付宝渠道 ID', + field_cidWxpay: '微信渠道 ID', + stripeWebhookHint: '请在 Stripe Dashboard 中将以下地址配置为 Webhook 端点:', productNamePrefix: '商品名前缀', productNameSuffix: '商品名后缀', preview: '预览', diff --git a/frontend/src/views/admin/SettingsView.vue b/frontend/src/views/admin/SettingsView.vue index 5ea5723c2e..074aecf11d 100644 --- a/frontend/src/views/admin/SettingsView.vue +++ b/frontend/src/views/admin/SettingsView.vue @@ -1830,9 +1830,16 @@