|
@@ -4,7 +4,6 @@ import cn.hutool.core.util.ObjectUtil;
|
|
|
import cn.hutool.core.util.StrUtil;
|
|
import cn.hutool.core.util.StrUtil;
|
|
|
import cn.hutool.json.JSONObject;
|
|
import cn.hutool.json.JSONObject;
|
|
|
import cn.hutool.json.JSONUtil;
|
|
import cn.hutool.json.JSONUtil;
|
|
|
-import com.baomidou.mybatisplus.core.toolkit.IdWorker;
|
|
|
|
|
import com.ekyong.www.pay.common.Constant;
|
|
import com.ekyong.www.pay.common.Constant;
|
|
|
import com.ekyong.www.pay.pay.qrcode.api.RhtQrcodePayApi;
|
|
import com.ekyong.www.pay.pay.qrcode.api.RhtQrcodePayApi;
|
|
|
import com.ekyong.www.pay.pay.qrcode.bean.QrcodeOpenPayRequestBean;
|
|
import com.ekyong.www.pay.pay.qrcode.bean.QrcodeOpenPayRequestBean;
|
|
@@ -179,9 +178,10 @@ public class NewPayServiceImpl implements NewPayService {
|
|
|
try {
|
|
try {
|
|
|
String decode = URLDecoder.decode(reqJsonData, "GBK");
|
|
String decode = URLDecoder.decode(reqJsonData, "GBK");
|
|
|
Map<String, String> map = JSONUtil.toBean(decode, Map.class);
|
|
Map<String, String> map = JSONUtil.toBean(decode, Map.class);
|
|
|
|
|
+ log.info("收到rth支付通知,{}", JSONUtil.toJsonStr(map));
|
|
|
|
|
|
|
|
// 微信商户key
|
|
// 微信商户key
|
|
|
- String mchKey = commonInfoService.findOne(75).getValue();
|
|
|
|
|
|
|
+ String mchKey = commonInfoService.findOne(435).getValue();
|
|
|
boolean valid = SignUtil.validSignature(map, mchKey);
|
|
boolean valid = SignUtil.validSignature(map, mchKey);
|
|
|
if (!valid) {
|
|
if (!valid) {
|
|
|
throw new SqxException("验签失败");
|
|
throw new SqxException("验签失败");
|
|
@@ -198,7 +198,7 @@ public class NewPayServiceImpl implements NewPayService {
|
|
|
return "success";
|
|
return "success";
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if (!StrUtil.equals(status, String.valueOf(PayStateEnums.WAIT_PAY.getStateCode()))) {
|
|
|
|
|
|
|
+ if (payDetails.getState() != PayStateEnums.WAIT_PAY.getStateCode()) {
|
|
|
// 支付订单不是未支付状态,直接返回
|
|
// 支付订单不是未支付状态,直接返回
|
|
|
return "success";
|
|
return "success";
|
|
|
}
|
|
}
|
|
@@ -222,7 +222,7 @@ public class NewPayServiceImpl implements NewPayService {
|
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
|
log.error("异步通知处理异常:{}", e.getMessage());
|
|
log.error("异步通知处理异常:{}", e.getMessage());
|
|
|
- return "fail";
|
|
|
|
|
|
|
+ throw new SqxException("异步通知处理异常," + e.getMessage());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -271,7 +271,7 @@ public class NewPayServiceImpl implements NewPayService {
|
|
|
* @param orderNo 订单编号
|
|
* @param orderNo 订单编号
|
|
|
*/
|
|
*/
|
|
|
private void handleTakeoutOrderPaySuccess(String orderNo) {
|
|
private void handleTakeoutOrderPaySuccess(String orderNo) {
|
|
|
- AppOrderService appOrderService = SpringContextUtils.getBean("appOrderService", AppOrderService.class);
|
|
|
|
|
|
|
+ AppOrderService appOrderService = SpringContextUtils.getBean(AppOrderService.class);
|
|
|
|
|
|
|
|
// 根据订单编号查询订单
|
|
// 根据订单编号查询订单
|
|
|
TbOrder order = appOrderService.selectOrderByNum(orderNo);
|
|
TbOrder order = appOrderService.selectOrderByNum(orderNo);
|
|
@@ -290,7 +290,8 @@ public class NewPayServiceImpl implements NewPayService {
|
|
|
.appId(commonInfoService.findOne(45).getValue())
|
|
.appId(commonInfoService.findOne(45).getValue())
|
|
|
.mchId(commonInfoService.findOne(434).getValue())
|
|
.mchId(commonInfoService.findOne(434).getValue())
|
|
|
.mchKey(commonInfoService.findOne(435).getValue())
|
|
.mchKey(commonInfoService.findOne(435).getValue())
|
|
|
- .h5Url(commonInfoService.findOne(19).getValue())
|
|
|
|
|
|
|
+ // .h5Url(commonInfoService.findOne(19).getValue())
|
|
|
|
|
+ .h5Url("http://b4n6pw.natappfree.cc")
|
|
|
.build();
|
|
.build();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|