edu/uniapp/src/api/pay.ts

72 lines
1.9 KiB
TypeScript
Raw Normal View History

2023-04-03 07:13:49 +00:00
import request from '@/utils/request'
//支付方式
export function getPayWay(data: any) {
return request.get({ url: '/pay/payWay', data }, { isAuth: true })
}
// 预支付
export function prepay(data: any) {
return request.post({ url: '/pay/prepay', data }, { isAuth: true })
}
// 预支付
export function getPayResult(data: any) {
return request.get({ url: '/pay/payStatus', data }, { isAuth: true })
}
2026-03-24 02:58:18 +00:00
// 开放银行支付宝服务窗支付
export function alipayJspay(data: any) {
return request.post({
url: '/api/payment/wholeNetworkAcquiring/new/payAlipayJspay',
data,
header: {
'Content-Type': 'application/x-www-form-urlencoded'
}
}, { isAuth: true })
}
// 开放银行微信支付JSPay
export function wechatJspay(data: any) {
return request.post({
url: '/api/payment/wholeNetworkAcquiring/new/payWechatJspay',
data,
header: {
'Content-Type': 'application/x-www-form-urlencoded'
}
}, { isAuth: true })
}
// 开放银行订单查询
export function unifiedTradeQuery(data: any) {
return request.post({
url: '/api/payment/wholeNetworkAcquiring/new/unifiedTradeQuery',
data,
header: {
'Content-Type': 'application/x-www-form-urlencoded'
}
}, { isAuth: true })
}
// 开放银行订单关闭
export function unifiedTradeClose(data: any) {
return request.post({
url: '/api/payment/wholeNetworkAcquiring/new/unifiedTradeClose',
data,
header: {
'Content-Type': 'application/x-www-form-urlencoded'
}
}, { isAuth: true })
}
// 开放银行订单撤销
export function unifiedMicropayReverse(data: any) {
return request.post({
url: '/api/payment/wholeNetworkAcquiring/new/unifiedMicropayReverse',
data,
header: {
'Content-Type': 'application/x-www-form-urlencoded'
}
}, { isAuth: true })
}