:art:【微信支付】增加商户上传反馈图片API,并修复消费者投诉2.0里查询投诉协商历史的接口问题
This commit is contained in:
@@ -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();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user