diff --git a/src/enums/daxpay/channelEnum.ts b/src/enums/daxpay/channelEnum.ts
index 945c4e5ab..09fec1388 100644
--- a/src/enums/daxpay/channelEnum.ts
+++ b/src/enums/daxpay/channelEnum.ts
@@ -3,7 +3,9 @@
*/
export enum ChannelEnum {
ALI = 'ali_pay',
+ ALI_ISV = 'alipay_isv',
WECHAT = 'wechat_pay',
+ WECHAT_ISV = 'wechat_pay_isv',
UNION_PAY = 'union_pay',
}
@@ -63,7 +65,6 @@ export enum ChannelAuthStatusEnum {
NOT_EXIST = 'not_exist',
}
-
/**
* 收银台类型
*/
@@ -78,7 +79,6 @@ export enum CheckoutTypeEnum {
* 支付调起类型
*/
export enum CheckoutCallTypeEnum {
-
/** 扫码支付 */
QR_CODE = 'qr_code',
/** 条码支付 */
@@ -93,6 +93,4 @@ export enum CheckoutCallTypeEnum {
JSAPI = 'jsapi',
/** 表单方式 */
FROM = 'from',
-
}
-
diff --git a/src/views/daxpay/common/channel/alipay/config/AlipayConfig.api.ts b/src/views/daxpay/common/channel/alipay/config/AlipayConfig.api.ts
index 41b852eb1..bc2c9ccb5 100644
--- a/src/views/daxpay/common/channel/alipay/config/AlipayConfig.api.ts
+++ b/src/views/daxpay/common/channel/alipay/config/AlipayConfig.api.ts
@@ -33,6 +33,10 @@ export interface AlipayConfig extends MchEntity {
enable: boolean
// 支付限额
limitAmount?: number
+ // 是否为特约商户
+ isv?: boolean
+ // 特约商户Token
+ appAuthToken?: string
// 商户账号ID
alipayUserId?: string
// 授权回调地址
diff --git a/src/views/daxpay/common/channel/alipay/config/AlipayConfigEdit.vue b/src/views/daxpay/common/channel/alipay/config/AlipayConfigEdit.vue
index 71452ffea..16ee6070b 100644
--- a/src/views/daxpay/common/channel/alipay/config/AlipayConfigEdit.vue
+++ b/src/views/daxpay/common/channel/alipay/config/AlipayConfigEdit.vue
@@ -34,7 +34,7 @@
支付限额(元)
@@ -55,6 +55,14 @@
+
+
+ 应用授权Token
+
+
+
+
@@ -195,7 +203,7 @@
import { BasicDrawer } from '@/components/Drawer'
import { Icon } from '@/components/Icon'
import BasicTitle from '@/components/Basic/src/BasicTitle.vue'
- import { ChannelConfig } from '@/views/daxpay/common/merchant/channel/ChannelConfig.api'
+ import { ChannelConfig } from "@/views/daxpay/common/merchant/channel/ChannelConfig.api";
const { handleCancel, diffForm, labelCol, wrapperCol, confirmLoading, visible, showable } =
useFormEdit()
@@ -205,8 +213,9 @@
const formRef = ref()
const channelConfig = ref({})
+ const isIsv = ref(false)
- const form = ref({
+ const form = ref({
aliAppId: '',
enable: false,
limitAmount: 20000,
@@ -220,8 +229,7 @@
alipayRootCert: '',
privateKey: '',
sandbox: false,
- remark: '',
- } as AlipayConfig)
+ })
let rawForm: any = {}
// 校验
const rules = computed(() => {
@@ -230,6 +238,7 @@
enable: [{ required: true, message: '请选择是否启用' }],
limitAmount: [{ required: true, message: '请输入单次支付限额' }],
authType: [{ required: true, message: '请选择认证方式' }],
+ appAuthToken: [{ required: isIsv.value, message: '请输入特约商户AppAuthToken' }],
signType: [{ required: true, message: '请选择加密类型' }],
alipayPublicKey: [{ required: form.value.authType === 'key', message: '请输入支付宝公钥' }],
privateKey: [{ required: true, message: '请输入应用私钥' }],
@@ -240,7 +249,6 @@
],
sandbox: [{ required: true, message: '请选择是否为沙箱环境' }],
expireTime: [{ required: true, message: '请输入默认超时配置' }],
- payWays: [{ required: true, message: '请选择支持的支付类型' }],
} as Record
})
// 事件
@@ -248,8 +256,9 @@
/**
* 入口
*/
- function init(config: ChannelConfig) {
+ function init(config: ChannelConfig, isv: boolean) {
channelConfig.value = config
+ isIsv.value = isv
resetForm()
visible.value = true
getInfo()
@@ -284,6 +293,7 @@
'alipayRootCert',
'privateKey',
),
+ isv: isIsv.value,
appId: channelConfig.value.appId,
})
.then(() => {
diff --git a/src/views/daxpay/common/channel/wechat/config/WechatPayConfig.api.ts b/src/views/daxpay/common/channel/wechat/config/WechatPayConfig.api.ts
index fcc946d60..cedb8b1d8 100644
--- a/src/views/daxpay/common/channel/wechat/config/WechatPayConfig.api.ts
+++ b/src/views/daxpay/common/channel/wechat/config/WechatPayConfig.api.ts
@@ -30,6 +30,12 @@ export interface WechatPayConfig extends MchEntity {
wxAppId?: string
// 微信商户号
wxMchId?: string
+ // 微信子应用AppId
+ subAppId?: string
+ // 微信子商户号
+ subMchId?: string
+ // 是否特约商户
+ isv?: boolean
// 是否启用
enable: boolean
// 授权认证地址
@@ -44,13 +50,17 @@ export interface WechatPayConfig extends MchEntity {
apiKeyV3?: string
// APPID对应的接口密码,用于获取接口调用凭证access_token时使用
appSecret?: string
- // 私钥Key
- privateKey?: string
- // 私钥证书
+ // 支付公钥
+ publicKey?: string
+ // 支付公钥ID
+ publicKeyId?: string
+ // 商户API证书
privateCert?: string
- // 证书序列号
+ // 商户API证书私钥
+ privateKey?: string
+ // 商户API证书序列号
certSerialNo?: string
- // p12的文件id
+ // p12的文件
p12?: string | null
// 应用域名,回调中会使用此参数
domain?: string
@@ -63,3 +73,17 @@ export interface WechatPayConfig extends MchEntity {
// 备注
remark?: string
}
+
+/**
+ * 特约商户服务商配置
+ */
+export interface WechatPaySimpleConfig extends MchEntity {
+ // 服务商应用号
+ isvAppId?: string
+ // 子商户应用AppId
+ subAppId?: string
+ // 子商户商户号
+ subMchId?: string
+ // 是否启用
+ enable?: boolean
+}
diff --git a/src/views/daxpay/common/channel/wechat/config/WechatPayConfigEdit.vue b/src/views/daxpay/common/channel/wechat/config/WechatPayConfigEdit.vue
index c3e5f9206..b5faeebff 100644
--- a/src/views/daxpay/common/channel/wechat/config/WechatPayConfigEdit.vue
+++ b/src/views/daxpay/common/channel/wechat/config/WechatPayConfigEdit.vue
@@ -24,13 +24,27 @@
-
+
+
+
+
+
+
+
支付限额(元)
@@ -96,53 +110,10 @@
placeholder="请输入APIv3密钥"
/>
-
-
-
- 证书序列号
-
-
-
-
-
-
-
- 私钥Key
-
-
- handleChange(info, 'privateKey')"
- >
- 私钥Key上传
-
-
-
-
- 删除上传的证书文件
-
-
-
-
-
-
- 私钥证书
+
+ 商户API证书
handleChange(info, 'privateCert')"
>
- 私钥Key上传
+ API证书上传
- 删除上传的证书文件
+ 删除上传的商户API证书
+
+
+
+ 商户API证书私钥
+
+
+ handleChange(info, 'privateKey')"
+ >
+ API证书私钥上传
+
+
+
+
+ 删除上传的API证书私钥
+
+
+
+
+
+
+
+
+
+
+ 支付公钥
+
+ handleChange(info, 'publicKey')"
+ >
+ 支付公钥上传
+
+
+
+
+ 删除上传的支付公钥
+
+
+
+
+
+
+
+
@@ -225,13 +270,14 @@
import { useUpload } from '@/hooks/bootx/useUpload'
import { useMessage } from '@/hooks/web/useMessage'
import BasicTitle from '@/components/Basic/src/BasicTitle.vue'
- import { ChannelConfig } from '@/views/daxpay/common/merchant/channel/ChannelConfig.api'
+ import { ChannelConfig } from "@/views/daxpay/common/merchant/channel/ChannelConfig.api";
const { handleCancel, diffForm, labelCol, wrapperCol, confirmLoading, visible, showable } =
useFormEdit()
// 文件上传
const { tokenHeader, uploadAction } = useUpload('/readBase64')
const { createMessage } = useMessage()
+ const isIsv = ref(false)
// 表单
const formRef = ref()
@@ -258,13 +304,12 @@
const rules = computed(() => {
return {
wxMchId: [{ required: true, message: '请输入商户号' }],
- limitAmount: [{ required: true, message: '请输入单次支付限额' }],
wxAppId: [{ required: true, message: '请输入应用编号' }],
- // appSecret: [{ required: true, message: '请输入AppSecret' }],
+ subMchId: [{ required: isIsv.value, message: '请输入子商户号' }],
+ limitAmount: [{ required: true, message: '请输入单次支付限额' }],
enable: [{ required: true, message: '请选择是否启用' }],
notifyUrl: [{ required: true, message: '请输入异步通知页面地址' }],
returnUrl: [{ required: true, message: '请输入同步通知页面地址' }],
- sandbox: [{ required: true, message: '请选择是否为沙箱环境' }],
apiVersion: [{ required: true, message: '请选择支付API版本' }],
apiKeyV2: [{ required: form.value.apiVersion === 'apiV2', message: '请输入V2秘钥' }],
apiKeyV3: [{ required: form.value.apiVersion === 'apiV3', message: '请输入V3秘钥' }],
@@ -281,7 +326,6 @@
message: '请上传私钥Key(apiclient_cert.pem)',
},
],
- payWays: [{ required: true, message: '请选择支持的支付类型' }],
} as Record
})
@@ -290,8 +334,9 @@
/**
* 入口
*/
- function init(config: ChannelConfig) {
+ function init(config: ChannelConfig, isv: boolean) {
channelConfig.value = config
+ isIsv.value = isv
visible.value = true
resetForm()
getInfo()
@@ -324,9 +369,13 @@
'appSecret',
'apiKeyV2',
'apiKeyV3',
- 'privateKey',
'privateCert',
+ 'privateKey',
+ 'certSerialNo',
+ 'publicKey',
+ 'publicKeyId',
),
+ isv: isIsv.value,
appId: channelConfig.value.appId,
})
.then(() => {
diff --git a/src/views/daxpay/common/develop/trade/DevelopTradePay.vue b/src/views/daxpay/common/develop/trade/DevelopTradePay.vue
index deb4410e6..cf3d1696b 100644
--- a/src/views/daxpay/common/develop/trade/DevelopTradePay.vue
+++ b/src/views/daxpay/common/develop/trade/DevelopTradePay.vue
@@ -156,6 +156,7 @@
clientIp: '127.0.0.1',
amount: 0.01,
allocation: false,
+ autoAllocation: false,
})
const rules = computed(() => {
return {
@@ -166,6 +167,7 @@
amount: [{ required: true, message: '支付金额不可为空' }],
method: [{ required: true, message: '支付方式不可为空' }],
allocation: [{ required: true, message: '分账不可为空' }],
+ autoAllocation: [{ required: true, message: '自动分账不可为空' }],
clientIp: [{ required: true, message: '终端IP不可为空' }],
nonceStr: [{ required: true, message: '随机数不可为空' }],
reqTime: [{ required: true, message: '请求时间不可为空' }],
diff --git a/src/views/daxpay/common/merchant/app/MchAppEdit.vue b/src/views/daxpay/common/merchant/app/MchAppEdit.vue
index ebe6501d3..fef171b4d 100644
--- a/src/views/daxpay/common/merchant/app/MchAppEdit.vue
+++ b/src/views/daxpay/common/merchant/app/MchAppEdit.vue
@@ -27,6 +27,12 @@
+
+
+ 禁用
+ 启用
+
+
{{ dictConvert('merchant_notify_type', row.notifyType) || '空' }}
+
+
+ {{ dictConvert('mch_app_status', row.status) || '空' }}
+
+
diff --git a/src/views/daxpay/common/merchant/channel/ChannelConfigEdit.vue b/src/views/daxpay/common/merchant/channel/ChannelConfigEdit.vue
index e4bf0f57b..8d2d324cc 100644
--- a/src/views/daxpay/common/merchant/channel/ChannelConfigEdit.vue
+++ b/src/views/daxpay/common/merchant/channel/ChannelConfigEdit.vue
@@ -25,15 +25,23 @@
function show(record: ChannelConfig) {
switch (record.channel) {
case ChannelEnum.ALI: {
- alipay.value.init(record)
+ alipay.value.init(record, false)
+ break
+ }
+ case ChannelEnum.ALI_ISV: {
+ alipay.value.init(record, true)
+ break
+ }
+ case ChannelEnum.UNION_PAY: {
+ union.value.init(record)
break
}
case ChannelEnum.WECHAT: {
wechat.value.init(record)
break
}
- case ChannelEnum.UNION_PAY: {
- union.value.init(record)
+ case ChannelEnum.WECHAT_ISV: {
+ wechat.value.init(record, true)
break
}
default: {
diff --git a/src/views/daxpay/common/merchant/channel/ChannelConfigList.vue b/src/views/daxpay/common/merchant/channel/ChannelConfigList.vue
index 7fe9a8da8..0071b53f9 100644
--- a/src/views/daxpay/common/merchant/channel/ChannelConfigList.vue
+++ b/src/views/daxpay/common/merchant/channel/ChannelConfigList.vue
@@ -113,8 +113,12 @@
switch (type) {
case ChannelEnum.ALI:
return alipay
+ case ChannelEnum.ALI_ISV:
+ return alipay
case ChannelEnum.WECHAT:
return wechat
+ case ChannelEnum.WECHAT_ISV:
+ return wechat
case ChannelEnum.UNION_PAY:
return unionPay
default:
diff --git a/src/views/daxpay/common/order/transfer/TransferOrder.api.ts b/src/views/daxpay/common/order/transfer/TransferOrder.api.ts
index 2aa155d0b..422cb883c 100644
--- a/src/views/daxpay/common/order/transfer/TransferOrder.api.ts
+++ b/src/views/daxpay/common/order/transfer/TransferOrder.api.ts
@@ -46,7 +46,7 @@ export function transfer(params) {
/**
* 转账信息同步
*/
-export function syncByTransferNo(id) {
+export function syncByTransferId(id) {
return defHttp.post>({
url: '/order/transfer/sync',
params: { id },
diff --git a/src/views/daxpay/common/order/transfer/TransferOrderList.vue b/src/views/daxpay/common/order/transfer/TransferOrderList.vue
index 2cafd091b..1fec5b211 100644
--- a/src/views/daxpay/common/order/transfer/TransferOrderList.vue
+++ b/src/views/daxpay/common/order/transfer/TransferOrderList.vue
@@ -105,13 +105,13 @@