feat: 更新支付模块 (Stripe/PayPal/PingPong) 和 uni-app 配置
This commit is contained in:
@@ -259,6 +259,20 @@ export const paymentApi = {
|
||||
request('/payment/create-order', 'POST', { plan, pay_type: payType }),
|
||||
}
|
||||
|
||||
export const creditApi = {
|
||||
balance: () => request('/credits/balance'),
|
||||
history: (page = 1, size = 20) => request(`/credits/history?page=${page}&size=${size}`),
|
||||
packages: () => request('/credits/packages'),
|
||||
subscriptionPlans: () => request('/credits/subscription-plans'),
|
||||
purchase: (packageId, payType = 'alipay') =>
|
||||
request('/credits/purchase', 'POST', { package_id: packageId, pay_type: payType }),
|
||||
stripePurchase: (packageId, gateway = 'stripe', successUrl, cancelUrl) =>
|
||||
request('/credits/stripe-purchase', 'POST', { package_id: packageId, gateway: gateway, success_url: successUrl, cancel_url: cancelUrl }),
|
||||
cancelSubscription: () => request('/credits/cancel-subscription', 'POST'),
|
||||
paypalCapture: (orderNo, token) =>
|
||||
request('/payment/paypal-capture', 'POST', { order_no: orderNo, token: token }),
|
||||
}
|
||||
|
||||
export const feedbackApi = {
|
||||
submit: (content, category = 'general', contact = '') =>
|
||||
request('/feedback', 'POST', { content, category, contact }),
|
||||
|
||||
Reference in New Issue
Block a user