web/buyer/src/api/pay.js
misworga831 8599708af3 Increase payment support and update parameters
- Improved payment system with WeChat and AliPay support
- Increased minimum recharge amount to `1`
- Added maximum of `9` characters for the recharge amount
- Added minimum withdraw amount setting
- Added real name field for AliPay
- Added third-party login field for AliPay
- Added maxlength of `9` characters for the withdraw amount
- Added a span tag to append '元' to the recharge amount
- Added a new function `with

[buyer/src/pages/home/userCenter/MoneyManagement.vue]
- Raise the minimum recharge amount to `1`
- Allow for a maximum of `9` characters for the recharge amount
- Added support for WeChat and AliPay
- Added a minimum withdraw amount setting
- Added a real name field for AliPay
- Added a third-party login field for AliPay
- Added maxlength of `9` characters for the withdraw amount
- Added a span tag to append '元' to the recharge amount
- Fixed typo
[buyer/src/api/pay.js]
- Add a new function `withdrawalSettingVO` for payment result inquiry
- Change the parameters for `payCallback` function
2023-03-08 21:58:29 +08:00

63 lines
1.4 KiB
JavaScript
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, {
Method
} from '@/plugins/request.js';
/**
* 获取支付详情
* @param orderType 交易类型,可用值:TRADE,ORDER,RECHARGE
* @param sn 订单编号
* @param clientType 调起方式PC
*/
export function tradeDetail (params) {
return request({
url: '/buyer/payment/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/payment/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/payment/cashier/result`,
needToken: true,
method: Method.GET,
params
});
}
/**
* 支付结果查询
* @param orderType 交易类型,可用值:TRADE,ORDER,RECHARGE
* @param sn 订单编号
*/
export function withdrawalSettingVO (params) {
return request({
url: `/buyer/wallet/wallet/withdrawalSettingVO`,
needToken: true,
method: Method.GET,
params
});
}