Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
phsl
/
admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
45e3667b
authored
May 05, 2025
by
YunaiV
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat:weixin-java from 4.7.2.B => 4.7.4.B
feat:微信支付 v3 从平台证书切换成微信支付公钥 feat:微信支付 v3 增加 header 解析
parent
c6898c0a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
64 additions
and
4 deletions
+64
-4
src/views/pay/app/components/channel/WeixinChannelForm.vue
+64
-4
No files found.
src/views/pay/app/components/channel/WeixinChannelForm.vue
View file @
45e3667b
...
@@ -71,11 +71,12 @@
...
@@ -71,11 +71,12 @@
>
>
<el-input
<el-input
v-model=
"formData.config.keyContent"
v-model=
"formData.config.keyContent"
:autosize=
"{ minRows:
8, maxRows: 8
}"
:autosize=
"{ minRows:
2, maxRows: 4
}"
:style=
"{ width: '100%' }"
:style=
"{ width: '100%' }"
placeholder=
"请上传 apiclient_cert.p12 证书"
placeholder=
"请上传 apiclient_cert.p12 证书"
readonly
readonly
type=
"textarea"
type=
"textarea"
:rows=
"2"
/>
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
""
label-width=
"180px"
>
<el-form-item
label=
""
label-width=
"180px"
>
...
@@ -108,11 +109,12 @@
...
@@ -108,11 +109,12 @@
>
>
<el-input
<el-input
v-model=
"formData.config.privateKeyContent"
v-model=
"formData.config.privateKeyContent"
:autosize=
"{ minRows:
8, maxRows: 8
}"
:autosize=
"{ minRows:
2, maxRows: 4
}"
:style=
"{ width: '100%' }"
:style=
"{ width: '100%' }"
placeholder=
"请上传 apiclient_key.pem 证书"
placeholder=
"请上传 apiclient_key.pem 证书"
readonly
readonly
type=
"textarea"
type=
"textarea"
:rows=
"2"
/>
/>
</el-form-item>
</el-form-item>
<el-form-item
label=
""
label-width=
"180px"
prop=
"privateKeyContentFile"
>
<el-form-item
label=
""
label-width=
"180px"
prop=
"privateKeyContentFile"
>
...
@@ -145,6 +147,47 @@
...
@@ -145,6 +147,47 @@
前往微信商户平台查看证书序列号
前往微信商户平台查看证书序列号
</a>
</a>
</el-form-item>
</el-form-item>
<el-form-item
label=
"public_key.pem 证书"
label-width=
"180px"
prop=
"config.publicKeyContent"
>
<el-input
v-model=
"formData.config.publicKeyContent"
:autosize=
"{ minRows: 2, maxRows: 4 }"
:style=
"{ width: '100%' }"
placeholder=
"请上传 public_key.pem 证书"
readonly
type=
"textarea"
:rows=
"2"
/>
</el-form-item>
<el-form-item
label=
""
label-width=
"180px"
prop=
"publicKeyContentFile"
>
<el-upload
ref=
"publicKeyContentFile"
:before-upload=
"pemFileBeforeUpload"
:http-request=
"publicKeyContentUpload"
:limit=
"1"
accept=
".pem"
action=
""
>
<el-button
type=
"primary"
>
<Icon
class=
"mr-5px"
icon=
"ep:upload"
/>
点击上传
</el-button>
</el-upload>
</el-form-item>
<el-form-item
label=
"公钥 ID"
label-width=
"180px"
prop=
"config.publicKeyId"
>
<el-input
v-model=
"formData.config.publicKeyId"
clearable
placeholder=
"请输入公钥 ID"
/>
</el-form-item>
<el-form-item
label-width=
"180px"
>
<a
href=
"https://pay.weixin.qq.com/doc/v3/merchant/4012153196"
target=
"_blank"
>
微信支付公钥产品简介及使用说明
</a>
</el-form-item>
</div>
</div>
<el-form-item
label=
"备注"
label-width=
"180px"
prop=
"remark"
>
<el-form-item
label=
"备注"
label-width=
"180px"
prop=
"remark"
>
<el-input
v-model=
"formData.remark"
:style=
"{ width: '100%' }"
/>
<el-input
v-model=
"formData.remark"
:style=
"{ width: '100%' }"
/>
...
@@ -184,7 +227,9 @@ const formData = ref<any>({
...
@@ -184,7 +227,9 @@ const formData = ref<any>({
keyContent
:
''
,
keyContent
:
''
,
privateKeyContent
:
''
,
privateKeyContent
:
''
,
certSerialNo
:
''
,
certSerialNo
:
''
,
apiV3Key
:
''
apiV3Key
:
''
,
publicKeyContent
:
''
,
publicKeyId
:
''
}
}
})
})
const
formRules
=
{
const
formRules
=
{
...
@@ -201,6 +246,8 @@ const formRules = {
...
@@ -201,6 +246,8 @@ const formRules = {
{
required
:
true
,
message
:
'请上传 apiclient_key.pem 证书'
,
trigger
:
'blur'
}
{
required
:
true
,
message
:
'请上传 apiclient_key.pem 证书'
,
trigger
:
'blur'
}
],
],
'config.certSerialNo'
:
[{
required
:
true
,
message
:
'请输入证书序列号'
,
trigger
:
'blur'
}],
'config.certSerialNo'
:
[{
required
:
true
,
message
:
'请输入证书序列号'
,
trigger
:
'blur'
}],
'config.publicKeyContent'
:
[{
required
:
true
,
message
:
'请上传 public_key.pem 证书'
,
trigger
:
'blur'
}],
'config.publicKeyId'
:
[{
required
:
true
,
message
:
'请输入公钥 ID'
,
trigger
:
'blur'
}],
'config.apiV3Key'
:
[{
required
:
true
,
message
:
'请上传 api V3 密钥值'
,
trigger
:
'blur'
}]
'config.apiV3Key'
:
[{
required
:
true
,
message
:
'请上传 api V3 密钥值'
,
trigger
:
'blur'
}]
}
}
const
formRef
=
ref
()
// 表单 Ref
const
formRef
=
ref
()
// 表单 Ref
...
@@ -267,7 +314,9 @@ const resetForm = (appId, code) => {
...
@@ -267,7 +314,9 @@ const resetForm = (appId, code) => {
keyContent
:
''
,
keyContent
:
''
,
privateKeyContent
:
''
,
privateKeyContent
:
''
,
certSerialNo
:
''
,
certSerialNo
:
''
,
apiV3Key
:
''
apiV3Key
:
''
,
publicKeyContent
:
''
,
publicKeyId
:
''
}
}
}
}
formRef
.
value
?.
resetFields
()
formRef
.
value
?.
resetFields
()
...
@@ -318,4 +367,15 @@ const keyContentUpload = async (event) => {
...
@@ -318,4 +367,15 @@ const keyContentUpload = async (event) => {
}
}
readFile
.
readAsDataURL
(
event
.
file
)
// 读成 base64
readFile
.
readAsDataURL
(
event
.
file
)
// 读成 base64
}
}
/**
* 读取 public_key.pem 到 publicKeyContent 字段
*/
const
publicKeyContentUpload
=
async
(
event
)
=>
{
const
readFile
=
new
FileReader
()
readFile
.
onload
=
(
e
:
any
)
=>
{
formData
.
value
.
config
.
publicKeyContent
=
e
.
target
.
result
}
readFile
.
readAsText
(
event
.
file
)
}
</
script
>
</
script
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment