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:
@@ -32,6 +32,7 @@ export interface PaymentConfig {
|
||||
max_pending_orders: number
|
||||
order_timeout_minutes: number
|
||||
balance_disabled: boolean
|
||||
balance_recharge_multiplier: number
|
||||
enabled_payment_types: PaymentType[]
|
||||
help_image_url: string
|
||||
help_text: string
|
||||
@@ -62,6 +63,7 @@ export interface CheckoutInfoResponse {
|
||||
global_max: number
|
||||
plans: SubscriptionPlan[]
|
||||
balance_disabled: boolean
|
||||
balance_recharge_multiplier: number
|
||||
help_text: string
|
||||
help_image_url: string
|
||||
stripe_publishable_key: string
|
||||
@@ -155,6 +157,7 @@ export interface CreateOrderRequest {
|
||||
|
||||
export interface CreateOrderResult {
|
||||
order_id: number
|
||||
amount: number
|
||||
pay_url?: string
|
||||
qr_code?: string
|
||||
client_secret?: string
|
||||
|
||||
Reference in New Issue
Block a user