|
@@ -248,6 +248,13 @@ public class WeChatPaymentStrategyImpl implements PaymentStrategy {
|
|
|
request.mchid = mchId;
|
|
request.mchid = mchId;
|
|
|
try {
|
|
try {
|
|
|
DirectAPIv3QueryResponse response = searchOrderRun(request);
|
|
DirectAPIv3QueryResponse response = searchOrderRun(request);
|
|
|
|
|
+
|
|
|
|
|
+ if (response.tradeState.equals("NOTPAY")) {
|
|
|
|
|
+ log.info("微信支付订单已支付,订单号:{}", response.outTradeNo);
|
|
|
|
|
+ return R.fail("NOTPAY");
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
return R.data(response);
|
|
return R.data(response);
|
|
|
} catch (WXPayUtility.ApiException e) {
|
|
} catch (WXPayUtility.ApiException e) {
|
|
|
log.error("查询微信支付订单状态失败,状态码:{},错误信息:{}", e.getErrorCode(), e.getMessage());
|
|
log.error("查询微信支付订单状态失败,状态码:{},错误信息:{}", e.getErrorCode(), e.getMessage());
|