All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.binarywang.wxpay.service.RedpackService Maven / Gradle / Ivy

There is a newer version: 4.7.1.B
Show newest version
package com.github.binarywang.wxpay.service;

import com.github.binarywang.wxpay.bean.request.WxPayRedpackQueryRequest;
import com.github.binarywang.wxpay.bean.request.WxPaySendMiniProgramRedpackRequest;
import com.github.binarywang.wxpay.bean.request.WxPaySendRedpackRequest;
import com.github.binarywang.wxpay.bean.result.WxPayRedpackQueryResult;
import com.github.binarywang.wxpay.bean.result.WxPaySendMiniProgramRedpackResult;
import com.github.binarywang.wxpay.bean.result.WxPaySendRedpackResult;
import com.github.binarywang.wxpay.exception.WxPayException;

/**
 * 红包相关接口.
 *
 * @author Binary Wang
 * created on  2019-12-26
 */
public interface RedpackService {
  /**
   * 
   * 发送小程序红包.
   * 文档详见: https://pay.weixin.qq.com/wiki/doc/api/tools/miniprogram_hb.php?chapter=13_9&index=2
   *  接口地址:https://api.mch.weixin.qq.com/mmpaymkttransfers/sendminiprogramhb
   * 
* * @param request 请求对象 * @return the result * @throws WxPayException the exception */ WxPaySendMiniProgramRedpackResult sendMiniProgramRedpack(WxPaySendMiniProgramRedpackRequest request) throws WxPayException; /** * 发送微信红包给个人用户. *
   * 文档详见:
   * 发送普通红包 https://pay.weixin.qq.com/wiki/doc/api/tools/cash_coupon.php?chapter=13_4&index=3
   *  接口地址:https://api.mch.weixin.qq.com/mmpaymkttransfers/sendredpack
   * 发送裂变红包 https://pay.weixin.qq.com/wiki/doc/api/tools/cash_coupon.php?chapter=13_5&index=4
   *  接口地址:https://api.mch.weixin.qq.com/mmpaymkttransfers/sendgroupredpack
   * 
* * @param request 请求对象 * @return the wx pay send redpack result * @throws WxPayException the wx pay exception */ WxPaySendRedpackResult sendRedpack(WxPaySendRedpackRequest request) throws WxPayException; /** *
   *   查询红包记录.
   *   用于商户对已发放的红包进行查询红包的具体信息,可支持普通红包和裂变包。
   *   请求Url:https://api.mch.weixin.qq.com/mmpaymkttransfers/gethbinfo
   *   是否需要证书:是(证书及使用说明详见商户证书)
   *   请求方式:POST
   * 
* * @param mchBillNo 商户发放红包的商户订单号,比如10000098201411111234567890 * @return the wx pay redpack query result * @throws WxPayException the wx pay exception */ WxPayRedpackQueryResult queryRedpack(String mchBillNo) throws WxPayException; /** *
   *   查询红包记录.
   *   用于商户对已发放的红包进行查询红包的具体信息,可支持普通红包和裂变包。
   *   请求Url:https://api.mch.weixin.qq.com/mmpaymkttransfers/gethbinfo
   *   是否需要证书:是(证书及使用说明详见商户证书)
   *   请求方式:POST
   * 
* * @param request 红包查询请求 * @return the wx pay redpack query result * @throws WxPayException the wx pay exception */ WxPayRedpackQueryResult queryRedpack(WxPayRedpackQueryRequest request) throws WxPayException; }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy