fix: sync CreateOrderRequest field names in payment store

This commit is contained in:
erio
2026-04-07 03:22:33 +08:00
parent 82cc410cdf
commit 4e494e484a
2 changed files with 3 additions and 8 deletions
+1 -1
View File
@@ -1 +1 @@
0.1.108.62
0.1.108.63
+2 -7
View File
@@ -6,7 +6,7 @@
import { defineStore } from 'pinia'
import { ref } from 'vue'
import { paymentAPI } from '@/api/payment'
import type { PaymentConfig, PaymentOrder, SubscriptionPlan } from '@/types/payment'
import type { PaymentConfig, PaymentOrder, SubscriptionPlan, CreateOrderRequest } from '@/types/payment'
export const usePaymentStore = defineStore('payment', () => {
// ==================== State ====================
@@ -55,12 +55,7 @@ export const usePaymentStore = defineStore('payment', () => {
}
/** Create a new order and set it as current */
async function createOrder(params: {
amount: number
payment_type: string
order_type: string
plan_id?: number
}) {
async function createOrder(params: CreateOrderRequest) {
const response = await paymentAPI.createOrder(params)
return response.data
}