1
0
mirror of synced 2025-12-22 00:48:00 +08:00

增加查询红包记录的接口 for #73

This commit is contained in:
Binary Wang
2016-11-28 17:39:42 +08:00
parent 5bb6a24590
commit 9d06a696d0
8 changed files with 539 additions and 19 deletions

View File

@@ -9,10 +9,7 @@ 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.result.WxPayRefundQueryResult;
import me.chanjar.weixin.mp.bean.pay.result.WxPayRefundResult;
import me.chanjar.weixin.mp.bean.pay.result.WxPaySendRedpackResult;
import me.chanjar.weixin.mp.bean.pay.result.WxPayUnifiedOrderResult;
import me.chanjar.weixin.mp.bean.pay.result.*;
import org.testng.annotations.Guice;
import org.testng.annotations.Test;
@@ -36,6 +33,9 @@ public class WxMpPayServiceImplTest {
}
/**
* Test method for {@link me.chanjar.weixin.mp.api.impl.WxMpPayServiceImpl#refund(WxPayRefundRequest, File)} .
*/
@Test
public void testRefund() throws Exception {
WxPayRefundRequest request = new WxPayRefundRequest();
@@ -48,6 +48,10 @@ public class WxMpPayServiceImplTest {
System.err.println(result);
}
/**
* Test method for {@link me.chanjar.weixin.mp.api.impl.WxMpPayServiceImpl#refundQuery(String, String, String, String)} .
*/
@Test
public void testRefundQuery() throws Exception {
WxPayRefundQueryResult result = this.wxService.getPayService().refundQuery("1", "", "", "");
@@ -67,12 +71,15 @@ public class WxMpPayServiceImplTest {
}
/**
* Test method for {@link me.chanjar.weixin.mp.api.impl.WxMpPayServiceImpl#sendRedpack(WxPaySendRedpackRequest, File)} .
*/
@Test
public void testSendRedpack() throws Exception {
WxPaySendRedpackRequest request = new WxPaySendRedpackRequest();
request.setActName("abc");
request.setClientIp("aaa");
request.setMchBillno("aaaa");
request.setMchBillNo("aaaa");
request
.setReOpenid(((WxXmlMpInMemoryConfigStorage) this.wxService.getWxMpConfigStorage()).getOpenid());
File keyFile = new File("E:\\dlt.p12");
@@ -80,6 +87,16 @@ public class WxMpPayServiceImplTest {
System.err.println(redpackResult);
}
/**
* Test method for {@link me.chanjar.weixin.mp.api.impl.WxMpPayServiceImpl#queryRedpack(String, File)}.
*/
@Test
public void testQueryRedpack() throws Exception {
File keyFile = new File("E:\\dlt.p12");
WxPayRedpackQueryResult redpackResult = this.wxService.getPayService().queryRedpack("aaaa", keyFile);
System.err.println(redpackResult);
}
/**
* Test method for {@link me.chanjar.weixin.mp.api.impl.WxMpPayServiceImpl#unifiedOrder(WxPayUnifiedOrderRequest)}.
*/