#178 实现发送代金券接口

This commit is contained in:
Binary Wang
2017-07-15 17:13:00 +08:00
committed by Binary Wang
parent 2726325fad
commit 33d5f87229
6 changed files with 589 additions and 44 deletions

View File

@ -1,6 +1,8 @@
package com.github.binarywang.wxpay.service.impl;
import com.github.binarywang.utils.qrcode.QrcodeUtils;
import com.github.binarywang.wxpay.bean.coupon.WxPayCouponSendRequest;
import com.github.binarywang.wxpay.bean.coupon.WxPayCouponSendResult;
import com.github.binarywang.wxpay.bean.request.*;
import com.github.binarywang.wxpay.bean.result.*;
import com.github.binarywang.wxpay.exception.WxPayException;
@ -26,7 +28,7 @@ import static org.testng.Assert.*;
*/
@Test
@Guice(modules = ApiTestModule.class)
public class WxPayServiceImplTest {
public class WxPayServiceAbstractImplTest {
private final Logger logger = LoggerFactory.getLogger(this.getClass());
@Inject
@ -271,4 +273,14 @@ public class WxPayServiceImplTest {
this.logger.info(signKey);
}
@Test
public void testSendCoupon() throws Exception {
WxPayCouponSendResult result = this.payService.sendCoupon(WxPayCouponSendRequest.newBuilder()
.couponStockId("123")
.openid("122")
.partnerTradeNo("1212")
.openidCount(1)
.build());
this.logger.info(result.toString());
}
}