|
|
@@ -501,7 +501,7 @@ public class FsStorePaymentServiceImpl implements IFsStorePaymentService {
|
|
|
String appId = StringUtils.isBlank(param.getAppId()) ? config.getMiniappId() : param.getAppId();
|
|
|
config.setAppId(appId);
|
|
|
}
|
|
|
- System.out.println("最终传参"+config);
|
|
|
+ log.info("最终传参:{}", config);
|
|
|
//组合返回参数
|
|
|
R result = new R();
|
|
|
// 根据 isNew 判断使用哪种发红包方式
|
|
|
@@ -510,9 +510,9 @@ public class FsStorePaymentServiceImpl implements IFsStorePaymentService {
|
|
|
} else {
|
|
|
result= sendRedPacketLegacyInternal(param, config);
|
|
|
}
|
|
|
- result.put("mchId",config.getMchId()+"");
|
|
|
+ result.put("mchId",config.getMchId());
|
|
|
result.put("isNew",config.getIsNew());
|
|
|
- System.out.println("红包返回:"+result);
|
|
|
+ log.info("红包返回:{}", result);
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
@@ -622,13 +622,14 @@ public class FsStorePaymentServiceImpl implements IFsStorePaymentService {
|
|
|
|
|
|
@Override
|
|
|
public String transferNotify(String notifyData, HttpServletRequest request) {
|
|
|
- logger.info("zyp \n【收到转账回调】:{}",notifyData);
|
|
|
+ logger.info("zyp \n【收到转账回调V2】:{}",notifyData);
|
|
|
try {
|
|
|
String json = configService.selectConfigByKey("redPacket.config");
|
|
|
RedPacketConfig config = JSONUtil.toBean(json, RedPacketConfig.class);
|
|
|
//创建微信订单
|
|
|
WxPayConfig payConfig = new WxPayConfig();
|
|
|
BeanUtils.copyProperties(config,payConfig);
|
|
|
+ log.info("商户号配置:{}", JSON.toJSONString(payConfig));
|
|
|
WxPayService wxPayService = new WxPayServiceImpl();
|
|
|
wxPayService.setConfig(payConfig);
|
|
|
SignatureHeader signatureHeader = new SignatureHeader();
|
|
|
@@ -637,7 +638,7 @@ public class FsStorePaymentServiceImpl implements IFsStorePaymentService {
|
|
|
signatureHeader.setSerial(request.getHeader("Wechatpay-Serial"));
|
|
|
signatureHeader.setSignature(request.getHeader("Wechatpay-Signature"));
|
|
|
WxPayTransferBatchesNotifyV3Result result = wxPayService.parseTransferBatchesNotifyV3Result(notifyData,signatureHeader);
|
|
|
- logger.info("到零钱回调:{}",result.getResult());
|
|
|
+ log.info("到零钱回调:{}",result.getResult());
|
|
|
if (result.getResult().getBatchStatus().equals("FINISHED") && result.getResult().getFailNum()==0) {
|
|
|
R r = redPacketLogService.syncRedPacket(result.getResult().getOutBatchNo(),result.getResult().getBatchId());
|
|
|
logger.info("result:{}",r);
|
|
|
@@ -650,7 +651,7 @@ public class FsStorePaymentServiceImpl implements IFsStorePaymentService {
|
|
|
return WxPayNotifyResponse.fail("");
|
|
|
}
|
|
|
} catch (WxPayException e) {
|
|
|
- logger.error("zyp \n【转账回调异常】:{}", e.getReturnMsg());
|
|
|
+ log.error("zyp \n【转账回调异常】:{}", e.getReturnMsg());
|
|
|
return WxPayNotifyResponse.fail(e.getMessage());
|
|
|
}
|
|
|
}
|
|
|
@@ -744,7 +745,7 @@ public class FsStorePaymentServiceImpl implements IFsStorePaymentService {
|
|
|
|
|
|
@Override
|
|
|
public String v3TransferNotify(String notifyData, HttpServletRequest request) {
|
|
|
- log.info("zyp \n【收到转账回调】:{}",notifyData);
|
|
|
+ log.info("zyp \n【收到转账回调V3】:{}",notifyData);
|
|
|
try {
|
|
|
String json = configService.selectConfigByKey("redPacket.config");
|
|
|
RedPacketConfig config = JSONUtil.toBean(json, RedPacketConfig.class);
|