feat(payment): balance recharge multiplier and refund amount separation
- Add balance_recharge_multiplier system setting (e.g. 1.2 = charge 100 get 120) - Separate order_amount (credited balance) from pay_amount (actual payment) - Refund calculates gateway amount proportionally from pay_amount - Frontend shows both amounts in order details, payment status, refund dialog - Admin settings UI for configuring recharge multiplier
This commit is contained in:
@@ -23,6 +23,7 @@ export interface AdminPaymentConfig {
|
||||
max_pending_orders: number
|
||||
enabled_payment_types: string[]
|
||||
balance_disabled: boolean
|
||||
balance_recharge_multiplier: number
|
||||
load_balance_strategy: string
|
||||
product_name_prefix: string
|
||||
product_name_suffix: string
|
||||
@@ -40,6 +41,7 @@ export interface UpdatePaymentConfigRequest {
|
||||
max_pending_orders?: number
|
||||
enabled_payment_types?: string[]
|
||||
balance_disabled?: boolean
|
||||
balance_recharge_multiplier?: number
|
||||
load_balance_strategy?: string
|
||||
product_name_prefix?: string
|
||||
product_name_suffix?: string
|
||||
|
||||
@@ -125,6 +125,7 @@ export interface SystemSettings {
|
||||
payment_max_pending_orders: number
|
||||
payment_enabled_types: string[]
|
||||
payment_balance_disabled: boolean
|
||||
payment_balance_recharge_multiplier: number
|
||||
payment_load_balance_strategy: string
|
||||
payment_product_name_prefix: string
|
||||
payment_product_name_suffix: string
|
||||
@@ -231,6 +232,7 @@ export interface UpdateSettingsRequest {
|
||||
payment_max_pending_orders?: number
|
||||
payment_enabled_types?: string[]
|
||||
payment_balance_disabled?: boolean
|
||||
payment_balance_recharge_multiplier?: number
|
||||
payment_load_balance_strategy?: string
|
||||
payment_product_name_prefix?: string
|
||||
payment_product_name_suffix?: string
|
||||
|
||||
Reference in New Issue
Block a user