添加订单押金暂扣与归还
This commit is contained in:
@@ -36,6 +36,11 @@ export interface Order {
|
||||
settlement_status: SettlementStatus
|
||||
refund_status?: string
|
||||
refund_amount_cent?: number
|
||||
deposit_hold_status?: string
|
||||
deposit_hold_amount_cent?: number
|
||||
deposit_hold_reason?: string
|
||||
deposit_held_at?: string
|
||||
deposit_hold_released_at?: string
|
||||
active_dispute?: ActiveDispute
|
||||
checkout?: Checkout
|
||||
admin_actions?: AdminActions
|
||||
@@ -387,6 +392,22 @@ export async function adminRejectRefund(id: number, action: 'restore' | 'close')
|
||||
return data.data
|
||||
}
|
||||
|
||||
export async function adminHoldDeposit(id: number, reason: string) {
|
||||
const { data } = await apiClient.post<ApiResponse<{ held: boolean }>>(
|
||||
`/admin/orders/${id}/deposit-hold`,
|
||||
{ reason }
|
||||
)
|
||||
return data.data
|
||||
}
|
||||
|
||||
export async function adminReleaseDeposit(id: number, reason: string) {
|
||||
const { data } = await apiClient.post<ApiResponse<{ released: boolean }>>(
|
||||
`/admin/orders/${id}/deposit-release`,
|
||||
{ reason }
|
||||
)
|
||||
return data.data
|
||||
}
|
||||
|
||||
export async function fetchPendingRefundOrders() {
|
||||
const { data } = await apiClient.get<ApiResponse<{ items: Order[] }>>(
|
||||
'/admin/orders/refund-pending'
|
||||
|
||||
Reference in New Issue
Block a user