edu/uniapp/src/api/pay.ts

72 lines
1.9 KiB
TypeScript
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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 })
}
// 开放银行支付宝服务窗支付
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 })
}