|
|
@@ -389,7 +389,7 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
}
|
|
|
|
|
|
// 校验签名
|
|
|
- boolean f = weChatService.checkSignWithMd5(map, shopConfigMapper.getByAppId(order.getShopId()).getSecret());
|
|
|
+ boolean f = weChatService.checkSignWithMd5(map, shopConfigMapper.getByAppId(Optional.ofNullable(order.getShopId()).orElse(ShopConfig.WX_DEFAULT_APP_ID)).getSecret());
|
|
|
if (!f) {
|
|
|
log.error("回调数据:{}", map);
|
|
|
throw BusinessRuntimeException.getInstance("支付成功回调, 校验签名失败.");
|
|
|
@@ -674,7 +674,7 @@ public class OrderDonServiceImpl extends ServiceImpl<OrderDonMapper, OrderDon> i
|
|
|
if (null == orderDon) {
|
|
|
throw BusinessRuntimeException.getInstance("订单不存在.");
|
|
|
}
|
|
|
- boolean signVerified = AlipaySignature.rsaCheckV1(params,shopConfigMapper.getByAppId((orderDon.getShopId())).getPublicKey(), BaseZfbConfig.charset, BaseZfbConfig.signType);
|
|
|
+ boolean signVerified = AlipaySignature.rsaCheckV1(params,shopConfigMapper.getByAppId((Optional.ofNullable(orderDon.getShopId()).orElse(ShopConfig.ZFB_DEFAULT_APP_ID))).getPublicKey(), BaseZfbConfig.charset, BaseZfbConfig.signType);
|
|
|
if (!signVerified) {
|
|
|
log.error("支付宝回调校验签名错误,自定义入参:{}", params.get("body"));
|
|
|
throw BusinessRuntimeException.getInstance("支付宝回调校验签名错误");
|