1
0
mirror of synced 2025-12-28 05:57:57 +08:00

:art:【微信支付】增加商户上传反馈图片API,并修复消费者投诉2.0里查询投诉协商历史的接口问题

This commit is contained in:
helloSk
2022-04-28 03:00:30 +00:00
committed by binarywang
parent f1977f53fd
commit 40f10de24b
4 changed files with 97 additions and 6 deletions

View File

@@ -1,8 +1,7 @@
package com.github.binarywang.wxpay.service.impl;
import com.github.binarywang.wxpay.bean.complaint.*;
import com.github.binarywang.wxpay.bean.profitsharing.*;
import com.github.binarywang.wxpay.constant.WxPayConstants;
import com.github.binarywang.wxpay.bean.media.ImageUploadResult;
import com.github.binarywang.wxpay.exception.WxPayException;
import com.github.binarywang.wxpay.service.WxPayService;
import com.github.binarywang.wxpay.testbase.ApiTestModule;
@@ -13,6 +12,8 @@ import org.testng.annotations.Guice;
import org.testng.annotations.Test;
import javax.crypto.BadPaddingException;
import java.io.File;
import java.io.IOException;
/**
* <pre>
@@ -152,4 +153,21 @@ public class ComplaintServiceImplTest {
this.payService.getComplaintsService().complete(request);
}
/**
* 商户上传反馈图片API
* @throws WxPayException
* @throws IOException
*/
@Test
public void testUploadResponseImage() throws WxPayException, IOException {
String filePath="你的图片文件的路径地址";
// String filePath="WxJava/images/banners/wiki.jpg";
File file = new File(filePath);
ImageUploadResult imageUploadResult = this.payService.getComplaintsService().uploadResponseImage(file);
imageUploadResult.getMediaId();
}
}