Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
jinli gu
Jeepay
Commits
dae2d4a6
Commit
dae2d4a6
authored
Aug 12, 2021
by
terrfly
Browse files
微信apiV2方式 支持证书配置项;
parent
d0622259
Changes
1
Hide whitespace changes
Inline
Side-by-side
jeepay-payment/src/main/java/com/jeequan/jeepay/pay/service/ConfigContextService.java
View file @
dae2d4a6
...
...
@@ -46,6 +46,7 @@ import lombok.extern.slf4j.Slf4j;
import
me.chanjar.weixin.mp.api.WxMpService
;
import
me.chanjar.weixin.mp.api.impl.WxMpServiceImpl
;
import
me.chanjar.weixin.mp.config.impl.WxMpDefaultConfigImpl
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
...
...
@@ -378,6 +379,11 @@ public class ConfigContextService {
if
(
CS
.
PAY_IF_VERSION
.
WX_V2
.
equals
(
apiVersion
))
{
// 微信API V2
wxPayConfig
.
setSignType
(
WxPayConstants
.
SignType
.
MD5
);
// api证书。
if
(
StringUtils
.
isNotBlank
(
cert
)){
wxPayConfig
.
setKeyPath
(
channelCertConfigKitBean
.
getCertFilePath
(
cert
));
}
}
else
if
(
CS
.
PAY_IF_VERSION
.
WX_V3
.
equals
(
apiVersion
))
{
// 微信API V3
wxPayConfig
.
setApiV3Key
(
apiV3Key
);
wxPayConfig
.
setCertSerialNo
(
serialNo
);
...
...
Write
Preview
Supports
Markdown
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