mirror of
https://gitee.com/beijing_hongye_huicheng/lilishop-ui.git
synced 2026-06-22 10:00:22 +08:00
commit message
This commit is contained in:
48
buyer/src/api/pay.js
Normal file
48
buyer/src/api/pay.js
Normal file
@@ -0,0 +1,48 @@
|
||||
import request, {
|
||||
Method
|
||||
} from '@/plugins/request.js';
|
||||
|
||||
/**
|
||||
* 获取支付详情
|
||||
* @param orderType 交易类型,可用值:TRADE,ORDER,RECHARGE
|
||||
* @param sn 订单编号
|
||||
* @param clientType 调起方式,PC
|
||||
*/
|
||||
export function tradeDetail (params) {
|
||||
return request({
|
||||
url: '/buyer/cashier/tradeDetail',
|
||||
needToken: true,
|
||||
method: Method.GET,
|
||||
params
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 支付
|
||||
* @param orderType 交易类型,可用值:TRADE,ORDER,RECHARGE
|
||||
* @param paymentMethod 支付方式 可用值:ALIPAY,WECHAT
|
||||
* @param payClient 调起方式 可用值:APP,NATIVE,JSAPI,H5
|
||||
* @param sn 订单编号
|
||||
*/
|
||||
export function pay (params) {
|
||||
return request({
|
||||
url: `/buyer/cashier/pay/${params.paymentMethod}/${params.paymentClient}`,
|
||||
needToken: true,
|
||||
method: Method.GET,
|
||||
params
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* 支付结果查询
|
||||
* @param orderType 交易类型,可用值:TRADE,ORDER,RECHARGE
|
||||
* @param sn 订单编号
|
||||
*/
|
||||
export function payCallback (params) {
|
||||
return request({
|
||||
url: `/buyer/cashier/result`,
|
||||
needToken: true,
|
||||
method: Method.GET,
|
||||
params
|
||||
});
|
||||
}
|
||||
Reference in New Issue
Block a user