From 9206f35ca459a67ba4c717c7fa4d6f4ffda1c750 Mon Sep 17 00:00:00 2001 From: mahmood Date: Fri, 24 Jul 2026 16:51:13 +0330 Subject: [PATCH 1/3] Feat add montify gateway --- .../menuPages/configuration/settingGroups.ts | 6 ++++ .../menuPages/configuration/settingTypes.ts | 33 +++++++++++++++++++ 2 files changed, 39 insertions(+) diff --git a/src/pages/menuPages/configuration/settingGroups.ts b/src/pages/menuPages/configuration/settingGroups.ts index e0808c0..2de92f9 100644 --- a/src/pages/menuPages/configuration/settingGroups.ts +++ b/src/pages/menuPages/configuration/settingGroups.ts @@ -171,6 +171,12 @@ export const SYSTEM_SETTING_GROUPS: SettingGroupDef[] = [ icon: 'vuesax-linear:card', match: (k) => k.startsWith('payping_') }, + { + id: 'external_payment', + title: 'درگاه خارجی (Montify)', + icon: 'vuesax-linear:card-pos', + match: (k) => k.startsWith('external_payment_') || k === 'wallet_payment_provider' + }, { id: 'accounting_provider', title: 'انتخاب سیستم حسابداری', diff --git a/src/pages/menuPages/configuration/settingTypes.ts b/src/pages/menuPages/configuration/settingTypes.ts index 9d3e99a..417a448 100644 --- a/src/pages/menuPages/configuration/settingTypes.ts +++ b/src/pages/menuPages/configuration/settingTypes.ts @@ -296,6 +296,9 @@ const KEY_TYPE_FALLBACK: Record = { montzar_open_sell: 'switch', payping_fin_sync_enabled: 'switch', external_order_api_enabled: 'switch', + external_payment_enabled: 'switch', + external_payment_gateway: 'select', + wallet_payment_provider: 'select', is_store: 'switch', banner_enabled: 'switch', permision__enabled: 'switch', @@ -374,6 +377,8 @@ const SELECT_OPTIONS_BY_KEY: Record = { accounting_provider: 'none,pargar,tahesab,zarin', price_provider: 'montzar,zaarbox,main_product', payping_gateway_name: 'sepal,', + external_payment_gateway: 'zarinpall,zibal,payping,sepal', + wallet_payment_provider: 'none,montify', unit: 'گرم,کیلوگرم', support_messenger: 'bale,telegram,whatsapp,rubika,eitaa,soroush,call,sms', price_channel_messengers: 'bale,telegram,rubika' @@ -638,6 +643,22 @@ const KEY_HELP_FALLBACK: Record = { 'وضعیت گزارش‌شده از سرویس همکار؛ فقط برای نمایش — این سوییچ را دستی تغییر ندهید.', external_order_api_enabled: 'روشن: دریافت کیف پول و ثبت سفارش از سرویس فروشگاه خارجی فعال است. خاموش: اتصال به سرویس فروشگاه خارجی غیرفعال است.', + external_payment_enabled: + 'روشن: سازگاری قدیمی — ترجیحاً از «درگاه شارژ آنلاین کیف پول» (wallet_payment_provider=montify) استفاده کنید.', + external_payment_base_url: + 'آدرس پایه API سرویس Montify (بدون اسلش انتهایی)، مثلاً https://node.example.com — فقط سرور؛ در اپ کاربر ارسال نمی‌شود.', + external_payment_client_id: + 'شناسه partner (client_id) — فقط سرور؛ هرگز در اپ کاربر یا پاسخ get_settings عمومی نیست.', + external_payment_client_secret: + 'رمز مخفی partner (client_secret) — فقط سرور. در فرانت و Network تب کاربر دیده نمی‌شود.', + external_payment_gateway: + 'نام درگاه فعال داخل Montify: zarinpall، zibal، payping یا sepal.', + external_payment_return_url: + 'آدرس برگشت مرورگر پس از پرداخت (whitelist پارتنر). خالی = /customer/wallet/payment/return/montify', + external_payment_webhook_url: + 'آدرس webhook. خالی = /customer/wallet/payment/webhook/montify', + wallet_payment_provider: + 'درگاه فعال شارژ آنلاین کیف: none=خاموش، montify=پارتنر Montify. برای افزودن درگاه مستقیم بعدی همین فیلد گسترش می‌یابد.', node_client_id: 'شناسه کلاینت برای اتصال امن به سرویس سفارش خارجی.', node_shared_secret: @@ -827,6 +848,14 @@ export const KEY_LABEL_FALLBACK: Record = { has_page_price_trigger: 'هشدار قیمت', has_page_notification: 'اعلان داخل اپ', jibit_enabled: 'احراز هویت جیبیت', + external_payment_enabled: 'شارژ آنلاین (سازگاری قدیمی)', + external_payment_base_url: 'آدرس API درگاه Montify', + external_payment_client_id: 'شناسه کلاینت Montify', + external_payment_client_secret: 'رمز کلاینت Montify', + external_payment_gateway: 'نام درگاه داخل Montify', + external_payment_return_url: 'آدرس برگشت از درگاه', + external_payment_webhook_url: 'آدرس Webhook درگاه', + wallet_payment_provider: 'درگاه شارژ آنلاین کیف پول', jibit_verification: 'تأیید کارت بانکی با جیبیت', register_jibit_verify: 'تأیید کدملی/موبایل در ثبت‌نام', min_withdraw: 'حداقل مبلغ برداشت', @@ -908,6 +937,9 @@ export const SETTING_LOCKED_KEYS = new Set([ 'bale_bot_token', 'banner_enabled', 'chart_id', 'chart_use_local_data', 'external_order_api_enabled', + 'external_payment_base_url', 'external_payment_client_id', 'external_payment_client_secret', + 'external_payment_gateway', 'external_payment_return_url', 'external_payment_webhook_url', + 'wallet_payment_provider', 'fee_deduct_from_gold', 'fee_single', 'referral_bonus_amount', @@ -963,6 +995,7 @@ export const SETTING_EDITABLE_KEYS = new Set([ 'deposit_sms_support_number', 'deposit_support_message_text', 'deposit_account_holder', 'deposit_card_number', 'deposit_sheba', 'endDay', + 'external_payment_enabled', 'fee_free', 'fee_service_charge_percentage', 'gift_for_referral', 'gift_for_referrer', 'invite_link_text', From cbf54b4a0ed0f50d9bde212d0bc9e6c389c904bc Mon Sep 17 00:00:00 2001 From: mahmood Date: Sun, 26 Jul 2026 22:18:41 +0330 Subject: [PATCH 2/3] fix some for group online gateway --- .../menuPages/configuration/settingGroups.ts | 15 ++++++++--- .../menuPages/configuration/settingTypes.ts | 26 +++++++++---------- 2 files changed, 25 insertions(+), 16 deletions(-) diff --git a/src/pages/menuPages/configuration/settingGroups.ts b/src/pages/menuPages/configuration/settingGroups.ts index 2de92f9..7bf799f 100644 --- a/src/pages/menuPages/configuration/settingGroups.ts +++ b/src/pages/menuPages/configuration/settingGroups.ts @@ -81,7 +81,16 @@ export const EDITABLE_SETTING_GROUPS: SettingGroupDef[] = [ k === 'support_messengers' || k.startsWith('support_messenger_') || k === 'deposit_sms_support_number' - || k.startsWith('deposit_'), + || (k.startsWith('deposit_') && !k.startsWith('external_')), + }, + { + id: 'gateway', + title: 'تنظیمات درگاه', + icon: 'vuesax-linear:card-pos', + match: (k) => + k.startsWith('external_payment_') + || k === 'wallet_payment_provider' + || k.startsWith('payping_'), }, { id: 'bots', @@ -172,8 +181,8 @@ export const SYSTEM_SETTING_GROUPS: SettingGroupDef[] = [ match: (k) => k.startsWith('payping_') }, { - id: 'external_payment', - title: 'درگاه خارجی (Montify)', + id: 'gateway', + title: 'تنظیمات درگاه', icon: 'vuesax-linear:card-pos', match: (k) => k.startsWith('external_payment_') || k === 'wallet_payment_provider' }, diff --git a/src/pages/menuPages/configuration/settingTypes.ts b/src/pages/menuPages/configuration/settingTypes.ts index 417a448..d32b3dc 100644 --- a/src/pages/menuPages/configuration/settingTypes.ts +++ b/src/pages/menuPages/configuration/settingTypes.ts @@ -644,11 +644,11 @@ const KEY_HELP_FALLBACK: Record = { external_order_api_enabled: 'روشن: دریافت کیف پول و ثبت سفارش از سرویس فروشگاه خارجی فعال است. خاموش: اتصال به سرویس فروشگاه خارجی غیرفعال است.', external_payment_enabled: - 'روشن: سازگاری قدیمی — ترجیحاً از «درگاه شارژ آنلاین کیف پول» (wallet_payment_provider=montify) استفاده کنید.', + 'روشن: در صورت کامل بودن BASE_URL و client_id و client_secret و gateway، دکمه پرداخت آنلاین در اپ نمایش داده می‌شود. خاموش: فقط واریز دستی.', external_payment_base_url: 'آدرس پایه API سرویس Montify (بدون اسلش انتهایی)، مثلاً https://node.example.com — فقط سرور؛ در اپ کاربر ارسال نمی‌شود.', external_payment_client_id: - 'شناسه partner (client_id) — فقط سرور؛ هرگز در اپ کاربر یا پاسخ get_settings عمومی نیست.', + 'شناسه partner (client_id) — فقط سرور؛ در اپ کاربر یا پاسخ get_settings عمومی نیست.', external_payment_client_secret: 'رمز مخفی partner (client_secret) — فقط سرور. در فرانت و Network تب کاربر دیده نمی‌شود.', external_payment_gateway: @@ -658,7 +658,7 @@ const KEY_HELP_FALLBACK: Record = { external_payment_webhook_url: 'آدرس webhook. خالی = /customer/wallet/payment/webhook/montify', wallet_payment_provider: - 'درگاه فعال شارژ آنلاین کیف: none=خاموش، montify=پارتنر Montify. برای افزودن درگاه مستقیم بعدی همین فیلد گسترش می‌یابد.', + 'نوع درگاه فعال: none=خاموش، montify=پارتنر Montify. برای شارژ آنلاین معمولاً montify را انتخاب کنید.', node_client_id: 'شناسه کلاینت برای اتصال امن به سرویس سفارش خارجی.', node_shared_secret: @@ -848,14 +848,14 @@ export const KEY_LABEL_FALLBACK: Record = { has_page_price_trigger: 'هشدار قیمت', has_page_notification: 'اعلان داخل اپ', jibit_enabled: 'احراز هویت جیبیت', - external_payment_enabled: 'شارژ آنلاین (سازگاری قدیمی)', - external_payment_base_url: 'آدرس API درگاه Montify', - external_payment_client_id: 'شناسه کلاینت Montify', - external_payment_client_secret: 'رمز کلاینت Montify', + external_payment_enabled: 'فعال‌سازی شارژ آنلاین', + external_payment_base_url: 'آدرس API درگاه (BASE_URL)', + external_payment_client_id: 'شناسه کلاینت (client_id)', + external_payment_client_secret: 'رمز کلاینت (client_secret)', external_payment_gateway: 'نام درگاه داخل Montify', - external_payment_return_url: 'آدرس برگشت از درگاه', - external_payment_webhook_url: 'آدرس Webhook درگاه', - wallet_payment_provider: 'درگاه شارژ آنلاین کیف پول', + external_payment_return_url: 'آدرس برگشت (return_url)', + external_payment_webhook_url: 'آدرس Webhook', + wallet_payment_provider: 'نوع درگاه شارژ آنلاین', jibit_verification: 'تأیید کارت بانکی با جیبیت', register_jibit_verify: 'تأیید کدملی/موبایل در ثبت‌نام', min_withdraw: 'حداقل مبلغ برداشت', @@ -937,9 +937,6 @@ export const SETTING_LOCKED_KEYS = new Set([ 'bale_bot_token', 'banner_enabled', 'chart_id', 'chart_use_local_data', 'external_order_api_enabled', - 'external_payment_base_url', 'external_payment_client_id', 'external_payment_client_secret', - 'external_payment_gateway', 'external_payment_return_url', 'external_payment_webhook_url', - 'wallet_payment_provider', 'fee_deduct_from_gold', 'fee_single', 'referral_bonus_amount', @@ -996,6 +993,9 @@ export const SETTING_EDITABLE_KEYS = new Set([ 'deposit_account_holder', 'deposit_card_number', 'deposit_sheba', 'endDay', 'external_payment_enabled', + 'external_payment_base_url', 'external_payment_client_id', 'external_payment_client_secret', + 'external_payment_gateway', 'external_payment_return_url', 'external_payment_webhook_url', + 'wallet_payment_provider', 'fee_free', 'fee_service_charge_percentage', 'gift_for_referral', 'gift_for_referrer', 'invite_link_text', From 78601b7aa48e0be0303f84003c63b4382d55f80e Mon Sep 17 00:00:00 2001 From: mahmood Date: Mon, 27 Jul 2026 01:48:37 +0330 Subject: [PATCH 3/3] Fix some for setting of gateway --- components.d.ts | 3 --- src/pages/menuPages/configuration/settingTypes.ts | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/components.d.ts b/components.d.ts index 50acf2e..f1c1419 100644 --- a/components.d.ts +++ b/components.d.ts @@ -10,7 +10,6 @@ export {} declare module '@vue/runtime-core' { export interface GlobalComponents { _index: typeof import('./src/core/components/_sample/_index.vue')['default'] - AAlert: typeof import('ant-design-vue/es')['Alert'] AAvatar: typeof import('ant-design-vue/es')['Avatar'] ABadge: typeof import('ant-design-vue/es')['Badge'] AButton: typeof import('ant-design-vue/es')['Button'] @@ -55,11 +54,9 @@ declare module '@vue/runtime-core' { ATable: typeof import('ant-design-vue/es')['Table'] ATabPane: typeof import('ant-design-vue/es')['TabPane'] ATabs: typeof import('ant-design-vue/es')['Tabs'] - ATag: typeof import('ant-design-vue/es')['Tag'] ATextarea: typeof import('ant-design-vue/es')['Textarea'] ATimePicker: typeof import('ant-design-vue/es')['TimePicker'] ATooltip: typeof import('ant-design-vue/es')['Tooltip'] - AUpload: typeof import('ant-design-vue/es')['Upload'] BaseButton: typeof import('./src/core/components/BaseButton/index.ts')['default'] BaseCard: typeof import('./src/core/components/BaseCard/index.ts')['default'] BaseCollapse: typeof import('./src/components/BaseCollapse.vue')['default'] diff --git a/src/pages/menuPages/configuration/settingTypes.ts b/src/pages/menuPages/configuration/settingTypes.ts index d32b3dc..f2e0753 100644 --- a/src/pages/menuPages/configuration/settingTypes.ts +++ b/src/pages/menuPages/configuration/settingTypes.ts @@ -654,9 +654,9 @@ const KEY_HELP_FALLBACK: Record = { external_payment_gateway: 'نام درگاه فعال داخل Montify: zarinpall، zibal، payping یا sepal.', external_payment_return_url: - 'آدرس برگشت مرورگر پس از پرداخت (whitelist پارتنر). خالی = /customer/wallet/payment/return/montify', + 'آدرس صفحه فرانت بعد از پرداخت. مثال: https://abaeigold.ir/wallet/payment-result — باید در whitelist پارتنر Montify باشد. خالی = دامنه سایت + /wallet/payment-result', external_payment_webhook_url: - 'آدرس webhook. خالی = /customer/wallet/payment/webhook/montify', + 'آدرس بک‌اند برای webhook (شارژ قطعی کیف). مثال: https://abaeigold.ir/server/customer/wallet/payment/webhook/montify — خالی = همین مسیر پیش‌فرض سرور', wallet_payment_provider: 'نوع درگاه فعال: none=خاموش، montify=پارتنر Montify. برای شارژ آنلاین معمولاً montify را انتخاب کنید.', node_client_id: