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
Litemall
Commits
880cdd0c
Commit
880cdd0c
authored
Apr 19, 2019
by
Junling Bu
Browse files
fix[litemall-wx-api]: 微信支付回调校验失败通知信息
parent
8da0b5ec
Changes
1
Hide whitespace changes
Inline
Side-by-side
litemall-wx-api/src/main/java/org/linlinjava/litemall/wx/service/WxOrderService.java
View file @
880cdd0c
...
...
@@ -5,6 +5,7 @@ import com.github.binarywang.wxpay.bean.notify.WxPayOrderNotifyResult;
import
com.github.binarywang.wxpay.bean.order.WxPayMpOrderResult
;
import
com.github.binarywang.wxpay.bean.request.WxPayUnifiedOrderRequest
;
import
com.github.binarywang.wxpay.bean.result.BaseWxPayResult
;
import
com.github.binarywang.wxpay.constant.WxPayConstants
;
import
com.github.binarywang.wxpay.exception.WxPayException
;
import
com.github.binarywang.wxpay.service.WxPayService
;
import
com.github.pagehelper.PageInfo
;
...
...
@@ -601,6 +602,15 @@ public class WxOrderService {
WxPayOrderNotifyResult
result
=
null
;
try
{
result
=
wxPayService
.
parseOrderNotifyResult
(
xmlResult
);
if
(!
WxPayConstants
.
ResultCode
.
SUCCESS
.
equals
(
result
.
getResultCode
())){
logger
.
error
(
xmlResult
);
throw
new
WxPayException
(
"微信通知支付失败!"
);
}
if
(!
WxPayConstants
.
ResultCode
.
SUCCESS
.
equals
(
result
.
getReturnCode
())){
logger
.
error
(
xmlResult
);
throw
new
WxPayException
(
"微信通知支付失败!"
);
}
}
catch
(
WxPayException
e
)
{
e
.
printStackTrace
();
return
WxPayNotifyResponse
.
fail
(
e
.
getMessage
());
...
...
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