|
@@ -481,7 +481,7 @@ public class FsStorePaymentServiceImpl implements IFsStorePaymentService
|
|
|
|
|
|
try {
|
|
try {
|
|
TransferBatchesResult transferBatchesResult = transferService.transferBatches(request);
|
|
TransferBatchesResult transferBatchesResult = transferService.transferBatches(request);
|
|
- return R.ok("发送红包成功").put("orderCode", transferBatchesResult.getOutBatchNo());
|
|
|
|
|
|
+ return R.ok("发送红包成功").put("orderCode", transferBatchesResult.getOutBatchNo()).put("batchId", transferBatchesResult.getBatchId());
|
|
} catch (WxPayException e) {
|
|
} catch (WxPayException e) {
|
|
e.printStackTrace();
|
|
e.printStackTrace();
|
|
return R.error("发送失败");
|
|
return R.error("发送失败");
|
|
@@ -565,8 +565,8 @@ public class FsStorePaymentServiceImpl implements IFsStorePaymentService
|
|
signatureHeader.setSignature(request.getHeader("Wechatpay-Signature"));
|
|
signatureHeader.setSignature(request.getHeader("Wechatpay-Signature"));
|
|
WxPayTransferBatchesNotifyV3Result result = wxPayService.parseTransferBatchesNotifyV3Result(notifyData,signatureHeader);
|
|
WxPayTransferBatchesNotifyV3Result result = wxPayService.parseTransferBatchesNotifyV3Result(notifyData,signatureHeader);
|
|
logger.info("到零钱回调:{}",result.getResult());
|
|
logger.info("到零钱回调:{}",result.getResult());
|
|
- if (result.getResult().getBatchStatus().equals("FINISHED")) {
|
|
|
|
- R r = redPacketLogService.syncRedPacket(result.getResult().getOutBatchNo());
|
|
|
|
|
|
+ if (result.getResult().getBatchStatus().equals("FINISHED") && result.getResult().getFailNum()==0) {
|
|
|
|
+ R r = redPacketLogService.syncRedPacket(result.getResult().getOutBatchNo(),result.getResult().getBatchId());
|
|
logger.info("result:{}",r);
|
|
logger.info("result:{}",r);
|
|
if (r.get("code").equals(200)){
|
|
if (r.get("code").equals(200)){
|
|
return WxPayNotifyResponse.success("处理成功");
|
|
return WxPayNotifyResponse.success("处理成功");
|
|
@@ -591,14 +591,9 @@ public class FsStorePaymentServiceImpl implements IFsStorePaymentService
|
|
//创建微信订单
|
|
//创建微信订单
|
|
WxPayConfig payConfig = new WxPayConfig();
|
|
WxPayConfig payConfig = new WxPayConfig();
|
|
BeanUtils.copyProperties(config,payConfig);
|
|
BeanUtils.copyProperties(config,payConfig);
|
|
-// payConfig.setCertSerialNo("63AC73F33E0A21973BB1DE533421A2337FD91C20");
|
|
|
|
WxPayService wxPayService = new WxPayServiceImpl();
|
|
WxPayService wxPayService = new WxPayServiceImpl();
|
|
wxPayService.setConfig(payConfig);
|
|
wxPayService.setConfig(payConfig);
|
|
SignatureHeader signatureHeader = new SignatureHeader();
|
|
SignatureHeader signatureHeader = new SignatureHeader();
|
|
-// signatureHeader.setTimeStamp("1622450000"); // 时间戳(Unix时间戳)
|
|
|
|
-// signatureHeader.setNonce("5K8264ILTKCH16CQ2502SI8ZNMTM67VS"); // 随机字符串
|
|
|
|
-// signatureHeader.setSerial("63AC73F33E0A21973BB1DE533421A2337FD91C20");
|
|
|
|
-// signatureHeader.setSignature("HbjssPzTBkM2iSCmxknS663zigo3gQ1jGQ4R6E6x9356bmV6Um4WfgGWZOH+fdCx5dxjHEiIci5kOYKl0ZdRfnexFFuM2riXLSqnRboOJZ+ew8FH4ZP/zCxtlDnmIYbARoIN46RegcRmGgfOznkLcD7ihr0JixgoZ0BOYk7YLhhcbLZaE2OJmwyyYIdJCH5lvg0mXyX1yfutNxPZz13i3OmZiU42xYr4bByJICWMFTwkzha9GVfOp67q/oVu0bEGIMgGdAVoEUJZXOijKdZdOrieXT07wMU31KITKcnizaUGl5peXejbJEd6CAQcX5e8KRlRSjY8DybHAm0JawVuAw==");
|
|
|
|
signatureHeader.setTimeStamp(request.getHeader("Wechatpay-Timestamp"));
|
|
signatureHeader.setTimeStamp(request.getHeader("Wechatpay-Timestamp"));
|
|
signatureHeader.setNonce(request.getHeader("Wechatpay-Nonce"));
|
|
signatureHeader.setNonce(request.getHeader("Wechatpay-Nonce"));
|
|
signatureHeader.setSerial(request.getHeader("Wechatpay-Serial"));
|
|
signatureHeader.setSerial(request.getHeader("Wechatpay-Serial"));
|
|
@@ -606,7 +601,7 @@ public class FsStorePaymentServiceImpl implements IFsStorePaymentService
|
|
TransferBillsNotifyResult result = wxPayService.parseTransferBillsNotifyV3Result(notifyData,signatureHeader);
|
|
TransferBillsNotifyResult result = wxPayService.parseTransferBillsNotifyV3Result(notifyData,signatureHeader);
|
|
logger.info("到零钱回调:{}",result.getResult());
|
|
logger.info("到零钱回调:{}",result.getResult());
|
|
if (result.getResult().getState().equals("SUCCESS")) {
|
|
if (result.getResult().getState().equals("SUCCESS")) {
|
|
- R r = redPacketLogService.syncRedPacket(result.getResult().getOutBillNo());
|
|
|
|
|
|
+ R r = redPacketLogService.syncRedPacket(result.getResult().getOutBillNo(),result.getResult().getTransferBillNo());
|
|
logger.info("result:{}",r);
|
|
logger.info("result:{}",r);
|
|
if (r.get("code").equals(200)){
|
|
if (r.get("code").equals(200)){
|
|
return WxPayNotifyResponse.success("处理成功");
|
|
return WxPayNotifyResponse.success("处理成功");
|