更新充值支付接口

This commit is contained in:
2025-06-19 18:21:45 +08:00
parent 39f30fcfa9
commit 9cd5710da1
3 changed files with 10 additions and 32 deletions

View File

@@ -1,7 +1,7 @@
'use server'
import {callByUser, callPublic} from '@/actions/base'
export async function RechargeByPay(props: {
export async function RechargePrepare(props: {
amount: string
platform: number
method: number
@@ -12,25 +12,10 @@ export async function RechargeByPay(props: {
}>('/api/user/recharge/prepare', props)
}
export async function RechargeByAlipayConfirm(props: {
export async function RechargeComplete(props: {
trade_no: string
}) {
return callByUser('/api/user/recharge/confirm/alipay', props)
}
export async function RechargeByWechat(props: {
amount: string
}) {
return callByUser<{
trade_no: string
pay_url: string
}>('/api/user/recharge/prepare/wechat', props)
}
export async function RechargeByWechatConfirm(props: {
trade_no: string
}) {
return callByUser('/api/user/recharge/confirm/wechat', props)
return callByUser('/api/user/recharge/complete', props)
}
export async function Identify(props: {