申请退款时,process当作已成功

This commit is contained in:
2025-07-08 13:55:51 +08:00
parent ecc011269c
commit 51ba702d82

View File

@@ -56,6 +56,7 @@ import static com.wechat.pay.java.core.http.Constant.WECHAT_PAY_NONCE;
import static com.wechat.pay.java.core.http.Constant.WECHAT_PAY_SERIAL; import static com.wechat.pay.java.core.http.Constant.WECHAT_PAY_SERIAL;
import static com.wechat.pay.java.core.http.Constant.WECHAT_PAY_SIGNATURE; import static com.wechat.pay.java.core.http.Constant.WECHAT_PAY_SIGNATURE;
import static com.wechat.pay.java.core.http.Constant.WECHAT_PAY_TIMESTAMP; import static com.wechat.pay.java.core.http.Constant.WECHAT_PAY_TIMESTAMP;
import static com.wechat.pay.java.service.refund.model.Status.PROCESSING;
import static com.wechat.pay.java.service.refund.model.Status.SUCCESS; import static com.wechat.pay.java.service.refund.model.Status.SUCCESS;
public class WxMpPayAdapter implements IPayAdapter { public class WxMpPayAdapter implements IPayAdapter {
@@ -272,7 +273,7 @@ public class WxMpPayAdapter implements IPayAdapter {
createRequest.setAmount(amountReq); createRequest.setAmount(amountReq);
createRequest.setNotifyUrl(request.getNotifyUrl()); createRequest.setNotifyUrl(request.getNotifyUrl());
Refund refund = service.create(createRequest); Refund refund = service.create(createRequest);
if (refund.getStatus() == SUCCESS) { if (refund.getStatus() == SUCCESS || refund.getStatus() == PROCESSING) {
resp.setSuccess(true); resp.setSuccess(true);
resp.setRefundNo(refund.getOutRefundNo()); resp.setRefundNo(refund.getOutRefundNo());
} else { } else {