钱包结算所有, 第三方充值到钱包
This commit is contained in:
@@ -91,6 +91,10 @@ export interface PaymentOrder {
|
||||
updated_at: string
|
||||
}
|
||||
|
||||
export interface PayOrderResult {
|
||||
paid: boolean
|
||||
}
|
||||
|
||||
export interface SubmitCheckoutPayload {
|
||||
content: string
|
||||
consumable_amount: number
|
||||
@@ -116,12 +120,7 @@ export async function createOrder(listingId: number) {
|
||||
}
|
||||
|
||||
export async function payOrder(id: number) {
|
||||
const { data } = await apiClient.post<ApiResponse<PaymentOrder>>(`/orders/${id}/pay`)
|
||||
return data.data
|
||||
}
|
||||
|
||||
export async function queryOrderPayment(id: number) {
|
||||
const { data } = await apiClient.post<ApiResponse<PaymentOrder>>(`/orders/${id}/pay/query`)
|
||||
const { data } = await apiClient.post<ApiResponse<PayOrderResult>>(`/orders/${id}/pay`)
|
||||
return data.data
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user