实现微信支付交易保障的接口 #56

This commit is contained in:
Binary Wang
2017-01-08 23:27:30 +08:00
parent 0e8df669eb
commit fa7360d0ca
5 changed files with 314 additions and 11 deletions

View File

@ -6,10 +6,7 @@ import me.chanjar.weixin.common.exception.WxErrorException;
import me.chanjar.weixin.mp.api.ApiTestModule;
import me.chanjar.weixin.mp.api.WxMpService;
import me.chanjar.weixin.mp.api.WxXmlMpInMemoryConfigStorage;
import me.chanjar.weixin.mp.bean.pay.request.WxEntPayRequest;
import me.chanjar.weixin.mp.bean.pay.request.WxPayRefundRequest;
import me.chanjar.weixin.mp.bean.pay.request.WxPaySendRedpackRequest;
import me.chanjar.weixin.mp.bean.pay.request.WxPayUnifiedOrderRequest;
import me.chanjar.weixin.mp.bean.pay.request.*;
import me.chanjar.weixin.mp.bean.pay.result.*;
import org.testng.Assert;
import org.testng.annotations.Guice;
@ -35,6 +32,18 @@ public class WxMpPayServiceImplTest {
}
@Test
public void testReport() throws Exception {
WxPayReportRequest request = new WxPayReportRequest();
request.setInterfaceUrl("hahahah");
request.setSignType("HMAC-SHA256");//貌似接口未校验此字段
request.setExecuteTime(1000);
request.setReturnCode("aaa");
request.setResultCode("aaa");
request.setUserIp("8.8.8");
this.wxService.getPayService().report(request);
}
/**
* 需要证书的接口需要先执行该方法
*/