🆕 #3452 【微信支付】新增消费者投诉2.0的更新退款审批结果的接口

This commit is contained in:
Jacky Tse
2024-12-24 13:21:00 +08:00
committed by Binary Wang
parent 16f2922fd5
commit 8fe1e6ea86
3 changed files with 112 additions and 0 deletions

View File

@@ -135,6 +135,20 @@ public interface ComplaintService {
*/
void complete(CompleteRequest request) throws WxPayException;
/**
* <pre>
* 更新退款审批结果API
* 针对“申请退款单”,需要商户明确返回是否可退款的审批结果。
* 若根据用户描述核实可以退款审批动作传入“APPROVE”同意退款并给出一个预计退款时间。传入“同意退款”后需要额外调退款接口发起原路退款。退款到账后投诉单的状态将自动扭转为“处理完成”。
* 若根据用户描述核实不能退款审批动作传入“REJECT”拒绝退款并说明拒绝退款原因。驳回退款后投诉单的状态将自动扭转为“处理完成”。
* 文档详见: <a href="https://pay.wechatpay.cn/docs/merchant/apis/consumer-complaint/complaints/update-refund-progress.html">...</a>
* </pre>
*
* @param request {@link UpdateRefundProgressRequest} 请求数据
* @throws WxPayException the wx pay exception
*/
void updateRefundProgress(UpdateRefundProgressRequest request) throws WxPayException;
/**
* <pre>
* 商户上传反馈图片API

View File

@@ -112,6 +112,14 @@ public class ComplaintServiceImpl implements ComplaintService {
this.payService.postV3(url, GSON.toJson(request));
}
@Override
public void updateRefundProgress(UpdateRefundProgressRequest request) throws WxPayException {
String url = String.format("%s/v3/merchant-service/complaints-v2/%s/update-refund-progress", this.payService.getPayBaseUrl(), request.getComplaintId());
// 上面url已经含有complaintId这里设置为空避免在body中再次传递否则微信会报错
request.setComplaintId(null);
this.payService.postV3(url, GSON.toJson(request));
}
@Override
public ImageUploadResult uploadResponseImage(File imageFile) throws WxPayException, IOException {
String url = String.format("%s/v3/merchant-service/images/upload", this.payService.getPayBaseUrl());