|
|
@@ -106,6 +106,7 @@ import com.google.gson.Gson;
|
|
|
import com.hc.openapi.tool.fastjson.JSON;
|
|
|
import com.wechat.pay.java.service.transferbatch.TransferBatchService;
|
|
|
import com.wechat.pay.java.service.transferbatch.model.InitiateBatchTransferRequest;
|
|
|
+import lombok.extern.slf4j.Slf4j;
|
|
|
import me.chanjar.weixin.common.bean.WxJsapiSignature;
|
|
|
import me.chanjar.weixin.common.error.WxErrorException;
|
|
|
import me.chanjar.weixin.mp.api.WxMpService;
|
|
|
@@ -126,6 +127,7 @@ import javax.servlet.http.HttpServletRequest;
|
|
|
* @date 2023-08-11
|
|
|
*/
|
|
|
@Service
|
|
|
+@Slf4j
|
|
|
public class FsStorePaymentServiceImpl implements IFsStorePaymentService {
|
|
|
Logger logger = LoggerFactory.getLogger(getClass());
|
|
|
@Autowired
|
|
|
@@ -742,7 +744,7 @@ public class FsStorePaymentServiceImpl implements IFsStorePaymentService {
|
|
|
|
|
|
@Override
|
|
|
public String v3TransferNotify(String notifyData, HttpServletRequest request) {
|
|
|
- logger.info("zyp \n【收到转账回调】:{}",notifyData);
|
|
|
+ log.info("zyp \n【收到转账回调】:{}",notifyData);
|
|
|
try {
|
|
|
String json = configService.selectConfigByKey("redPacket.config");
|
|
|
RedPacketConfig config = JSONUtil.toBean(json, RedPacketConfig.class);
|
|
|
@@ -757,10 +759,10 @@ public class FsStorePaymentServiceImpl implements IFsStorePaymentService {
|
|
|
signatureHeader.setSerial(request.getHeader("Wechatpay-Serial"));
|
|
|
signatureHeader.setSignature(request.getHeader("Wechatpay-Signature"));
|
|
|
TransferBillsNotifyResult result = wxPayService.parseTransferBillsNotifyV3Result(notifyData,signatureHeader);
|
|
|
- logger.info("到零钱回调:{}",result.getResult());
|
|
|
+ log.info("到零钱回调:{}",result.getResult());
|
|
|
if (result.getResult().getState().equals("SUCCESS")) {
|
|
|
R r = redPacketLogService.syncRedPacket(result.getResult().getOutBillNo(),result.getResult().getTransferBillNo());
|
|
|
- logger.info("result:{}",r);
|
|
|
+ log.info("result:{}",r);
|
|
|
if (r.get("code").equals(200)){
|
|
|
return WxPayNotifyResponse.success("处理成功");
|
|
|
}else {
|
|
|
@@ -770,7 +772,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());
|
|
|
}
|
|
|
}
|