修改退款申请封装

This commit is contained in:
gong
2026-01-15 13:32:55 +08:00
parent ee25493570
commit 98dfda0bca
20 changed files with 361 additions and 136 deletions

View File

@@ -10,10 +10,12 @@ import com.alibaba.fastjson2.JSONObject;
import com.alibaba.fastjson2.TypeReference;
import com.czg.entity.PolyBaseReq;
import com.czg.entity.PolyBaseResp;
import com.czg.entity.notify.CzgPayNotifyDTO;
import com.czg.entity.resp.*;
import com.czg.enums.CzgPayEnum;
import com.czg.pay.CzgPayBaseReq;
import com.czg.pay.CzgRefundReq;
import com.czg.pay.PayNotifyRespDTO;
import com.czg.resp.CzgRespCode;
import com.czg.resp.CzgResult;
import com.czg.utils.AssertUtil;
@@ -158,6 +160,32 @@ public class PolyPayUtils {
}
/**
* 回调数据处理
*/
public static PayNotifyRespDTO getNotifyResp(PolyBaseResp respParams) {
AssertUtil.isNull(respParams, "聚合交易 回调数据为空");
log.info("聚合交易请求响应,{}", respParams);
if (!"000000".equals(respParams.getCode())) {
log.error("聚合回调响应失败,{}", respParams);
return null;
}
CzgPayNotifyDTO dto = JSONObject.parseObject(respParams.getBizData(), CzgPayNotifyDTO.class);
return new PayNotifyRespDTO()
.setMchOrderNo(dto.getMchOrderNo())
.setThirdOrderNo(dto.getPayOrderId())
.setAmount(dto.getAmount())
.setPlatform(dto.getPayType())
.setExtData(dto.getExtParam())
.setPaySuccessTime(dto.getPayTime())
.setErrorMsg("")
.setStatus(dto.getState())
.setOriginalData(respParams.getBizData());
}
/**
* 默认Post
*