mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-11-03 21:59:05 +08:00
#178 实现发送代金券接口
This commit is contained in:
@ -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());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user