com.foxinmy.weixin4j.api
Class CashApi

java.lang.Object
  extended by com.foxinmy.weixin4j.api.BaseApi
      extended by com.foxinmy.weixin4j.api.MchApi
          extended by com.foxinmy.weixin4j.api.CashApi

public class CashApi
extends MchApi

现金API

Since:
JDK 1.6
Author:
jinyu(foxinmy@gmail.com)
See Also:
现金红包, 企业付款

Constructor Summary
CashApi(WeixinPayAccount weixinAccount)
           
 
Method Summary
 CorpPaymentRecord queryCorpPayment(String outTradeNo)
          企业付款查询 用于商户的企业付款操作进行结果查询,返回付款操作详细结果
 double queryExchageRate(CurrencyType currencyType, Date date)
          查询汇率
 RedpacketRecord queryRedpack(String outTradeNo)
          查询红包记录
 SettlementRecord querySettlement(boolean status, Pageable pageable, Date start, Date end)
          查询结算资金
 CorpPaymentResult sendCorpPayment(CorpPayment payment)
          企业付款 实现企业向个人付款,针对部分有开发能力的商户, 提供通过API完成企业付款的功能。 比如目前的保险行业向客户退保、给付、理赔。
 RedpacketSendResult sendRedpack(Redpacket redpacket)
          发放红包 企业向微信用户个人发现金红包
 List<Future<RedpacketSendResult>> sendRedpacks(Redpacket... redpackets)
          批量发放红包 企业向微信用户个人发现金红包
 
Methods inherited from class com.foxinmy.weixin4j.api.MchApi
getWeixinSignature
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CashApi

public CashApi(WeixinPayAccount weixinAccount)
Method Detail

sendRedpack

public RedpacketSendResult sendRedpack(Redpacket redpacket)
                                throws WeixinException
发放红包 企业向微信用户个人发现金红包

Parameters:
redpacket - 红包信息
Returns:
发放结果
Throws:
WeixinException
See Also:
Redpacket, RedpacketSendResult, 发放现金红包接口, 发放裂变红包接口

sendRedpacks

public List<Future<RedpacketSendResult>> sendRedpacks(Redpacket... redpackets)
批量发放红包 企业向微信用户个人发现金红包

Parameters:
redpacket - 多个红包信息
Returns:
发放结果
Throws:
WeixinException
See Also:
sendRedpacks(Redpacket...)

queryRedpack

public RedpacketRecord queryRedpack(String outTradeNo)
                             throws WeixinException
查询红包记录

Parameters:
outTradeNo - 商户发放红包的商户订单号
Returns:
红包记录
Throws:
WeixinException
See Also:
RedpacketRecord, 查询现金红包接口, 查询裂变红包接口

sendCorpPayment

public CorpPaymentResult sendCorpPayment(CorpPayment payment)
                                  throws WeixinException
企业付款 实现企业向个人付款,针对部分有开发能力的商户, 提供通过API完成企业付款的功能。 比如目前的保险行业向客户退保、给付、理赔。

接口调用规则:

  • 给同一个实名用户付款,单笔单日限额2W/2W
  • 给同一个非实名用户付款,单笔单日限额2000/2000
  • 一个商户同一日付款总额限额100W
  • 单笔最小金额默认为1元
  • 每个用户每天最多可付款10次,可以在商户平台--API安全进行设置
  • 给同一个用户付款时间间隔不得低于15秒

    Parameters:
    payment - 付款信息
    Returns:
    付款结果
    Throws:
    WeixinException
    See Also:
    CorpPayment, CorpPaymentResult, 企业付款接口

  • queryCorpPayment

    public CorpPaymentRecord queryCorpPayment(String outTradeNo)
                                       throws WeixinException
    企业付款查询 用于商户的企业付款操作进行结果查询,返回付款操作详细结果

    Parameters:
    outTradeNo - 商户调用企业付款API时使用的商户订单号
    Returns:
    付款记录
    Throws:
    WeixinException
    See Also:
    CorpPaymentRecord, 企业付款查询接口

    querySettlement

    public SettlementRecord querySettlement(boolean status,
                                            Pageable pageable,
                                            Date start,
                                            Date end)
                                     throws WeixinException
    查询结算资金

    Parameters:
    status - 是否结算
    pageable - 分页数据
    start - 开始日期 查询未结算记录时,该字段可不传
    end - 结束日期 查询未结算记录时,该字段可不传
    Returns:
    结算金额记录
    Throws:
    WeixinException
    See Also:
    SettlementRecord, 查询结算资金接口

    queryExchageRate

    public double queryExchageRate(CurrencyType currencyType,
                                   Date date)
                            throws WeixinException
    查询汇率

    Parameters:
    currencyType - 外币币种
    date - 日期 不填则默认当天
    Returns:
    汇率 例如美元兑换人民币的比例为6.5
    Throws:
    WeixinException
    See Also:
    查询汇率接口


    Copyright © 2014–2017. All rights reserved.