Package com.foxinmy.weixin4j.pay
Class WeixinPayProxy
- java.lang.Object
-
- com.foxinmy.weixin4j.pay.WeixinPayProxy
-
-
Constructor Summary
Constructors Constructor Description WeixinPayProxy()
微信支付接口实现(使用weixin4j.properties配置的account商户信息)WeixinPayProxy(WeixinPayAccount weixinPayAccount)
微信支付接口实现
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ReceiverResult
addProfitSharingReceiver(Receiver receiver)
添加分账接收方 服务商代子商户发起添加分账接收方请求,后续可通过发起分账请求将结算后的钱分到该分账接收方。RefundResult
applyRefund(IdQuery idQuery, String outRefundNo, double totalFee)
申请退款RefundResult
applyRefund(IdQuery idQuery, String outRefundNo, double totalFee, double refundFee, CurrencyType refundFeeType, String opUserId, String refundDesc, RefundAccountType refundAccountType)
申请退款OpenIdResult
authCode2openId(String authCode)
授权码查询OPENIDMerchantResult
closeOrder(String outTradeNo)
关闭订单MchPayRequest
createAppPayRequest(String body, String outTradeNo, double totalFee, String notifyUrl, String createIp, String attach, SceneInfoStore store)
创建APP支付请求对象MchPayRequest
createDepositPayRequest(String code, String body, String outTradeNo, double totalFee, String createIp, String openId, String attach, SceneInfoStore store, boolean isFacePay)
押金支付请求 注意:(此功能微信已下架,改为邀请开通,因此暂未使用)MchPayRequest
createJSPayRequest(String openId, String body, String outTradeNo, double totalFee, String notifyUrl, String createIp, String attach)
创建JSAPI支付请求对象MchPayRequest
createMicroPayRequest(String authCode, String body, String outTradeNo, double totalFee, String createIp, String attach, SceneInfoStore store)
提交被扫支付String
createNativePayRequest(String productId)
创建Native支付(扫码支付)链接【模式一】MchPayRequest
createNativePayRequest(String productId, String body, String outTradeNo, double totalFee, String notifyUrl, String createIp, String attach)
创建Native支付(扫码支付)链接【模式二】NativePayResponse
createNativePayResponse(String productId, String body, String outTradeNo, double totalFee, String notifyUrl, String createIp, String attach)
创建Native支付(扫码支付)回调对象【模式一】MchPayRequest
createPayRequest(MchPayPackage payPackage)
创建支付请求对象PrePay
createPrePay(MchPayPackage payPackage)
统一下单接口 除被扫支付场景以外,商户系统先调用该接口在微信支付服务后台生成预支付交易单,返回正确的预支付交易回话标识后再按扫码、JSAPI 、APP等不同场景生成交易串调起支付。MchPayRequest
createWapPayRequest(String body, String outTradeNo, double totalFee, String notifyUrl, String createIp, String attach, SceneInfoApp app)
创建WAP支付请求对象CustomsOrderResult
declareCustomsOrder(CustomsOrder customsOrder)
订单附加信息提交void
downloadBill(Date billDate, BillType billType, OutputStream outputStream, TarType tarType)
下载对账单
1.微信侧未成功下单的交易不会出现在对账单中。支付成功后撤销的交易会出现在对账 单中,跟原支付单订单号一致,bill_type 为 REVOKED;
2.微信在次日 9 点启动生成前一天的对账单,建议商户 9 点半后再获取;
3.对账单中涉及金额的字段单位为“元”。String
getPayShorturl(String url)
native支付URL转短链接:用于扫码原生支付模式一中的二维码链接转成短链接(weixin://wxpay/s/XXXXXX),减小二维码数据量 ,提升扫描速度和精确度。WeixinPayAccount
getWeixinPayAccount()
获取微信商户账号信息WeixinSignature
getWeixinSignature()
获取微信签名类PayfaceAuthinfo
getWxPayfaceAuthinfo(String storeId, String storeName, String deviceId, String attach, String rawdata)
微信刷脸支付,获取调用凭证ProfitSharingResult
profitSharing(String transactionId, String outOrderNo, List<ReceiverProfit> receivers, Boolean multi)
请求分帐ProfitSharingResult
profitSharingFinish(String transactionId, String outOrderNo, String description)
完结分账 1、不需要进行分账的订单,可直接调用本接口将订单的金额全部解冻给本商户 2、调用多次分账接口后,需要解冻剩余资金时,调用本接口将剩余的分账金额全部解冻给特约商户 3、已调用请求单次分账后,剩余待分账金额为零,不需要再调用此接口。ProfitSharingResult
profitSharingQuery(String transactionId, String outOrderNo)
分帐查询ProfitSharingReturnResult
profitSharingReturn(ProfitId id, String outReturnNo, ReturnAccountType returnAccountType, String returnAccount, int returnAmount, String description)
分账回退ProfitSharingReturnResult
profitSharingReturnQuery(ProfitId id, String outReturnNo)
回退结果查询CorpPaymentRecord
queryCorpPayment(String outTradeNo)
企业付款查询 用于商户的企业付款操作进行结果查询,返回付款操作详细结果CouponDetail
queryCouponDetail(String openId, String couponId, String stockId)
查询代金券详细CouponStock
queryCouponStock(String couponStockId)
查询代金券批次CustomsOrderRecord
queryCustomsOrder(IdQuery idQuery, CustomsCity customsCity)
订单附加信息查询double
queryExchageRate(CurrencyType currencyType, Date date)
查询汇率Order
queryOrder(IdQuery idQuery)
订单查询RedpacketRecord
queryRedpack(String outTradeNo)
查询红包记录RefundRecord
queryRefund(IdQuery idQuery)
退款查询SettlementRecord
querySettlement(boolean status, com.foxinmy.weixin4j.model.paging.Pageable pageable, Date start, Date end)
查询结算资金ReceiverResult
removeProfitSharingReceiver(Receiver receiver)
删除分账接收方 商户发起删除分账接收方请求,删除后不支持将结算后的钱分到该分账接收方。com.foxinmy.weixin4j.http.weixin.XmlResult
reportInterface(String interfaceUrl, int executeTime, String outTradeNo, String ip, Date time, com.foxinmy.weixin4j.http.weixin.XmlResult returnXml)
接口上报MerchantResult
reverseOrder(IdQuery idQuery)
冲正订单(需要证书) 当支付返回失败,或收银系统超时需要取消交易,可以调用该接口 接口逻辑:支 付失败的关单,支付成功的撤销支付 7天以内的单可撤销,其他正常支付的单 如需实现相同功能请调用退款接口 调用扣款接口后请勿立即调用撤销,需要等待5秒以上。先调用查单接口,如果没有确切的返回,再调用撤销CorpPaymentResult
sendCorpPayment(CorpPayment payment)
企业付款CouponResult
sendCoupon(String couponStockId, String partnerTradeNo, String openId, String opUserId)
发放代金券(需要证书)RedpacketSendResult
sendRedpack(Redpacket redpacket)
发放红包 企业向微信用户个人发现金红包List<Future<RedpacketSendResult>>
sendRedpacks(Redpacket... redpackets)
批量发放红包 企业向微信用户个人发现金红包
-
-
-
Field Detail
-
VERSION
public static final String VERSION
-
-
Constructor Detail
-
WeixinPayProxy
public WeixinPayProxy()
微信支付接口实现(使用weixin4j.properties配置的account商户信息)
-
WeixinPayProxy
public WeixinPayProxy(WeixinPayAccount weixinPayAccount)
微信支付接口实现- Parameters:
weixinPayAccount
- 微信商户信息
-
-
Method Detail
-
getWeixinPayAccount
public WeixinPayAccount getWeixinPayAccount()
获取微信商户账号信息- Returns:
-
getWeixinSignature
public WeixinSignature getWeixinSignature()
获取微信签名类- Returns:
-
createPrePay
public PrePay createPrePay(MchPayPackage payPackage) throws com.foxinmy.weixin4j.exception.WeixinException
统一下单接口 除被扫支付场景以外,商户系统先调用该接口在微信支付服务后台生成预支付交易单,返回正确的预支付交易回话标识后再按扫码、JSAPI 、APP等不同场景生成交易串调起支付。- Parameters:
payPackage
- 包含订单信息的对象- Returns:
- 预支付对象
- Throws:
com.foxinmy.weixin4j.exception.WeixinException
- See Also:
PayApi
,MchPayPackage
,PrePay
, 统一下单接口
-
createPayRequest
public MchPayRequest createPayRequest(MchPayPackage payPackage) throws com.foxinmy.weixin4j.exception.WeixinException
创建支付请求对象
-
createJSPayRequest
public MchPayRequest createJSPayRequest(String openId, String body, String outTradeNo, double totalFee, String notifyUrl, String createIp, String attach) throws com.foxinmy.weixin4j.exception.WeixinException
创建JSAPI支付请求对象- Parameters:
openId
- 用户IDbody
- 订单描述outTradeNo
- 订单号totalFee
- 订单总额(元)notifyUrl
- 支付通知地址createIp
- ip地址attach
- 附加数据 非必填- Returns:
- JSAPI支付对象
- Throws:
com.foxinmy.weixin4j.exception.WeixinException
- See Also:
PayApi
,JSAPIPayRequest
,MchPayRequest.toRequestString()
-
createNativePayRequest
public String createNativePayRequest(String productId)
创建Native支付(扫码支付)链接【模式一】
-
createNativePayResponse
public NativePayResponse createNativePayResponse(String productId, String body, String outTradeNo, double totalFee, String notifyUrl, String createIp, String attach) throws com.foxinmy.weixin4j.exception.WeixinException
创建Native支付(扫码支付)回调对象【模式一】- Parameters:
productId
- 商品IDbody
- 商品描述outTradeNo
- 商户内部唯一订单号totalFee
- 商品总额 单位元notifyUrl
- 支付回调URLcreateIp
- 订单生成的机器 IPattach
- 附加数据 非必填- Returns:
- Native回调对象
- Throws:
com.foxinmy.weixin4j.exception.WeixinException
- See Also:
PayApi
,NativePayResponse
, 扫码支付 , 模式一
-
createNativePayRequest
public MchPayRequest createNativePayRequest(String productId, String body, String outTradeNo, double totalFee, String notifyUrl, String createIp, String attach) throws com.foxinmy.weixin4j.exception.WeixinException
创建Native支付(扫码支付)链接【模式二】- Parameters:
productId
- 商品IDbody
- 商品描述outTradeNo
- 商户内部唯一订单号totalFee
- 商品总额 单位元notifyUrl
- 支付回调URLcreateIp
- 订单生成的机器 IPattach
- 附加数据 非必填- Returns:
- Native支付对象
- Throws:
com.foxinmy.weixin4j.exception.WeixinException
- See Also:
PayApi
,NATIVEPayRequest
,MchPayRequest.toRequestString()
, 扫码支付 , 模式二
-
createAppPayRequest
public MchPayRequest createAppPayRequest(String body, String outTradeNo, double totalFee, String notifyUrl, String createIp, String attach, SceneInfoStore store) throws com.foxinmy.weixin4j.exception.WeixinException
创建APP支付请求对象- Parameters:
body
- 商品描述outTradeNo
- 商户内部唯一订单号totalFee
- 商品总额 单位元notifyUrl
- 支付回调URLcreateIp
- 订单生成的机器 IPattach
- 附加数据 非必填store
- APP支付已无门店信息,不需要再传- Returns:
- APP支付对象
- Throws:
com.foxinmy.weixin4j.exception.WeixinException
- See Also:
PayApi
,SceneInfoStore
,APPPayRequest
,MchPayRequest.toRequestString()
, APP支付
-
createWapPayRequest
public MchPayRequest createWapPayRequest(String body, String outTradeNo, double totalFee, String notifyUrl, String createIp, String attach, SceneInfoApp app) throws com.foxinmy.weixin4j.exception.WeixinException
创建WAP支付请求对象- Parameters:
body
- 商品描述outTradeNo
- 商户内部唯一订单号totalFee
- 商品总额 单位元notifyUrl
- 支付回调URLcreateIp
- 订单生成的机器 IPattach
- 附加数据 非必填app
- 应用信息- Returns:
- WAP支付对象
- Throws:
com.foxinmy.weixin4j.exception.WeixinException
- See Also:
PayApi
,SceneInfoApp
,WAPPayRequest
,MchPayRequest.toRequestString()
, WAP支付
-
createMicroPayRequest
public MchPayRequest createMicroPayRequest(String authCode, String body, String outTradeNo, double totalFee, String createIp, String attach, SceneInfoStore store) throws com.foxinmy.weixin4j.exception.WeixinException
提交被扫支付- Parameters:
authCode
- 扫码支付授权码 ,设备读取用户微信中的条码或者二维码信息body
- 商品描述outTradeNo
- 商户内部唯一订单号totalFee
- 商品总额 单位元createIp
- 订单生成的机器 IPattach
- 附加数据 非必填store
- 门店信息 非必填- Returns:
- 支付的订单信息
- Throws:
com.foxinmy.weixin4j.exception.WeixinException
- See Also:
PayApi
,Order
,SceneInfoStore
,MICROPayRequest
,MchPayRequest.toRequestString()
, 提交被扫支付API
-
createDepositPayRequest
public MchPayRequest createDepositPayRequest(String code, String body, String outTradeNo, double totalFee, String createIp, String openId, String attach, SceneInfoStore store, boolean isFacePay) throws com.foxinmy.weixin4j.exception.WeixinException
押金支付请求 注意:(此功能微信已下架,改为邀请开通,因此暂未使用)- Parameters:
code
- 授权码/人脸凭证body
- 商品或支付单简要描述,格式要求:门店品牌名-城市分店名-实际商品名称outTradeNo
- 商户系统内部的订单号,32个字符内、可包含字母;更换授权码必须要换新的商户订单号totalFee
- 订单总金额,单位元createIp
- 调用微信支付API的机器IPopenId
- 用户在商户appid 下的唯一标识,人脸支付押金时提供attach
- 附加数据,在查询API和支付通知中原样返回,该字段主要用于商户携带订单的自定义数据,非必填store
- 门店信息,仅在付款码支付押金时提供,非必填isFacePay
- 是否人脸押金支付,否则是付款码押金支付- Returns:
- Throws:
com.foxinmy.weixin4j.exception.WeixinException
-
queryOrder
public Order queryOrder(IdQuery idQuery) throws com.foxinmy.weixin4j.exception.WeixinException
订单查询当商户后台、网络、服务器等出现异常,商户系统最终未接收到支付通知; 调用支付接口后,返回系统错误或未知交易状态情况; 调用被扫支付API,返回USERPAYING的状态; 调用关单或撤销接口API之前,需确认支付状态;
-
applyRefund
public RefundResult applyRefund(IdQuery idQuery, String outRefundNo, double totalFee, double refundFee, CurrencyType refundFeeType, String opUserId, String refundDesc, RefundAccountType refundAccountType) throws com.foxinmy.weixin4j.exception.WeixinException
申请退款- Throws:
com.foxinmy.weixin4j.exception.WeixinException
- See Also:
PayApi.applyRefund(IdQuery, String, double, double, CurrencyType, String, String, RefundAccountType)
-
applyRefund
public RefundResult applyRefund(IdQuery idQuery, String outRefundNo, double totalFee) throws com.foxinmy.weixin4j.exception.WeixinException
申请退款- Throws:
com.foxinmy.weixin4j.exception.WeixinException
- See Also:
PayApi.applyRefund(IdQuery, String, double)
-
queryRefund
public RefundRecord queryRefund(IdQuery idQuery) throws com.foxinmy.weixin4j.exception.WeixinException
退款查询提交退款申请后,通过调用该接口查询退款状态。退款有一定延时,用零钱支付的退款20分钟内到账,银行卡支付的退款3个工作日后重新查询退款状态。
- Parameters:
idQuery
- 单号 refund_id、out_refund_no、 out_trade_no 、 transaction_id 四个参数必填一个,优先级为: refund_id>out_refund_no>transaction_id>out_trade_no- Returns:
- 退款记录
- Throws:
com.foxinmy.weixin4j.exception.WeixinException
- Since:
- V3
- See Also:
PayApi
,RefundRecord
, 退款查询API
-
downloadBill
public void downloadBill(Date billDate, BillType billType, OutputStream outputStream, TarType tarType) throws com.foxinmy.weixin4j.exception.WeixinException
下载对账单
1.微信侧未成功下单的交易不会出现在对账单中。支付成功后撤销的交易会出现在对账 单中,跟原支付单订单号一致,bill_type 为 REVOKED;
2.微信在次日 9 点启动生成前一天的对账单,建议商户 9 点半后再获取;
3.对账单中涉及金额的字段单位为“元”。
-
reverseOrder
public MerchantResult reverseOrder(IdQuery idQuery) throws com.foxinmy.weixin4j.exception.WeixinException
冲正订单(需要证书) 当支付返回失败,或收银系统超时需要取消交易,可以调用该接口 接口逻辑:支 付失败的关单,支付成功的撤销支付 7天以内的单可撤销,其他正常支付的单 如需实现相同功能请调用退款接口 调用扣款接口后请勿立即调用撤销,需要等待5秒以上。先调用查单接口,如果没有确切的返回,再调用撤销- Parameters:
idQuery
- 商户系统内部的订单号, transaction_id 、 out_trade_no 二选一,如果同时存在优先级: transaction_id> out_trade_no- Returns:
- 撤销结果
- Throws:
com.foxinmy.weixin4j.exception.WeixinException
- Since:
- V3
- See Also:
PayApi
-
closeOrder
public MerchantResult closeOrder(String outTradeNo) throws com.foxinmy.weixin4j.exception.WeixinException
关闭订单商户订单支付失败需要生成新单号重新发起支付,要对原订单号调用关单,避免重复支付;系统下单后,用户支付超时,系统退出不再受理,避免用户继续 ,请调用关单接口,如果关单失败,返回已完 成支付请按正常支付处理。如果出现银行掉单,调用关单成功后,微信后台会主动发起退款。
-
getPayShorturl
public String getPayShorturl(String url) throws com.foxinmy.weixin4j.exception.WeixinException
native支付URL转短链接:用于扫码原生支付模式一中的二维码链接转成短链接(weixin://wxpay/s/XXXXXX),减小二维码数据量 ,提升扫描速度和精确度。
-
reportInterface
public com.foxinmy.weixin4j.http.weixin.XmlResult reportInterface(String interfaceUrl, int executeTime, String outTradeNo, String ip, Date time, com.foxinmy.weixin4j.http.weixin.XmlResult returnXml) throws com.foxinmy.weixin4j.exception.WeixinException
接口上报- Parameters:
interfaceUrl
- 上报对应的接口的完整 URL, 类似: https://api.mch.weixin.q q.com/pay/unifiedorderexecuteTime
- 接口耗时情况,单位为毫秒outTradeNo
- 商户系统内部的订单号,商 户可以在上报时提供相关商户订单号方便微信支付更好 的提高服务质量。ip
- 发起接口调用时的机器 IPtime
- 商户调用该接口时商户自己 系统的时间returnXml
- 调用接口返回的基本数据- Returns:
- 处理结果
- Throws:
com.foxinmy.weixin4j.exception.WeixinException
- See Also:
PayApi
, 接口测试上报API
-
sendCoupon
public CouponResult sendCoupon(String couponStockId, String partnerTradeNo, String openId, String opUserId) throws com.foxinmy.weixin4j.exception.WeixinException
发放代金券(需要证书)- Parameters:
couponStockId
- 代金券批次idpartnerTradeNo
- 商户发放凭据号(格式:商户id+日期+流水号),商户侧需保持唯一性openId
- 用户的openidopUserId
- 操作员帐号, 默认为商户号 可在商户平台配置操作员对应的api权限 可为空- Returns:
- 发放结果
- Throws:
com.foxinmy.weixin4j.exception.WeixinException
- See Also:
CouponApi
,CouponResult
, 发放代金券接口
-
queryCouponStock
public CouponStock queryCouponStock(String couponStockId) throws com.foxinmy.weixin4j.exception.WeixinException
查询代金券批次- Parameters:
couponStockId
- 代金券批次ID- Returns:
- 代金券批次信息
- Throws:
com.foxinmy.weixin4j.exception.WeixinException
- See Also:
CouponApi
,CouponStock
, 查询代金券批次信息接口
-
queryCouponDetail
public CouponDetail queryCouponDetail(String openId, String couponId, String stockId) throws com.foxinmy.weixin4j.exception.WeixinException
查询代金券详细- Parameters:
openId
- 用户IDcouponId
- 代金券IDstockId
- 代金劵对应的批次号- Returns:
- 代金券详细信息
- Throws:
com.foxinmy.weixin4j.exception.WeixinException
- See Also:
CouponApi
,CouponDetail
, 查询代金券详细信息接口
-
sendRedpack
public RedpacketSendResult sendRedpack(Redpacket redpacket) throws com.foxinmy.weixin4j.exception.WeixinException
发放红包 企业向微信用户个人发现金红包- Parameters:
redpacket
- 红包信息- Returns:
- 发放结果
- Throws:
com.foxinmy.weixin4j.exception.WeixinException
- See Also:
CashApi
,Redpacket
,RedpacketSendResult
, 发放现金红包接口, 发放裂变红包接口
-
sendRedpacks
public List<Future<RedpacketSendResult>> sendRedpacks(Redpacket... redpackets)
批量发放红包 企业向微信用户个人发现金红包- Parameters:
redpackets
- 多个红包信息- Returns:
- 发放结果
- Throws:
com.foxinmy.weixin4j.exception.WeixinException
- See Also:
CashApi
,sendRedpacks(Redpacket...)
-
queryRedpack
public RedpacketRecord queryRedpack(String outTradeNo) throws com.foxinmy.weixin4j.exception.WeixinException
查询红包记录- Parameters:
outTradeNo
- 商户发放红包的商户订单号- Returns:
- 红包记录
- Throws:
com.foxinmy.weixin4j.exception.WeixinException
- See Also:
CashApi
,RedpacketRecord
, 查询现金红包接口, 查询裂变红包接口
-
sendCorpPayment
public CorpPaymentResult sendCorpPayment(CorpPayment payment) throws com.foxinmy.weixin4j.exception.WeixinException
企业付款- Throws:
com.foxinmy.weixin4j.exception.WeixinException
- See Also:
CashApi.sendCorpPayment(CorpPayment)
-
queryCorpPayment
public CorpPaymentRecord queryCorpPayment(String outTradeNo) throws com.foxinmy.weixin4j.exception.WeixinException
企业付款查询 用于商户的企业付款操作进行结果查询,返回付款操作详细结果- Parameters:
outTradeNo
- 商户调用企业付款API时使用的商户订单号- Returns:
- 付款记录
- Throws:
com.foxinmy.weixin4j.exception.WeixinException
- See Also:
CashApi
,CorpPaymentRecord
, 企业付款查询接口
-
authCode2openId
public OpenIdResult authCode2openId(String authCode) throws com.foxinmy.weixin4j.exception.WeixinException
授权码查询OPENID- Parameters:
authCode
- 扫码支付授权码,设备读取用户微信中的条码或者二维码信息- Returns:
- 查询结果
- Throws:
com.foxinmy.weixin4j.exception.WeixinException
- See Also:
CashApi
,OpenIdResult
, 授权码查询OPENID
-
querySettlement
public SettlementRecord querySettlement(boolean status, com.foxinmy.weixin4j.model.paging.Pageable pageable, Date start, Date end) throws com.foxinmy.weixin4j.exception.WeixinException
查询结算资金- Parameters:
status
- 是否结算pageable
- 分页数据start
- 开始日期 查询未结算记录时,该字段可不传end
- 结束日期 查询未结算记录时,该字段可不传- Returns:
- 结算金额记录
- Throws:
com.foxinmy.weixin4j.exception.WeixinException
- See Also:
CashApi
,SettlementRecord
, 查询结算资金接口
-
queryExchageRate
public double queryExchageRate(CurrencyType currencyType, Date date) throws com.foxinmy.weixin4j.exception.WeixinException
查询汇率
-
declareCustomsOrder
public CustomsOrderResult declareCustomsOrder(CustomsOrder customsOrder) throws com.foxinmy.weixin4j.exception.WeixinException
订单附加信息提交- Parameters:
customsOrder
- 附加订单信息- Returns:
- 报关结果
- Throws:
com.foxinmy.weixin4j.exception.WeixinException
- See Also:
CustomsApi
,CustomsOrder
,CustomsOrderResult
, 附加订单信息提交接口
-
queryCustomsOrder
public CustomsOrderRecord queryCustomsOrder(IdQuery idQuery, CustomsCity customsCity) throws com.foxinmy.weixin4j.exception.WeixinException
订单附加信息查询- Parameters:
idQuery
- out_trade_no,transaction_id,sub_order_no,sub_order_id四选一customsCity
- 海关- Returns:
- 报关记录
- Throws:
com.foxinmy.weixin4j.exception.WeixinException
- See Also:
CustomsOrderRecord
,CustomsApi
, 附加订单信息查询接口
-
getWxPayfaceAuthinfo
public PayfaceAuthinfo getWxPayfaceAuthinfo(String storeId, String storeName, String deviceId, String attach, String rawdata) throws com.foxinmy.weixin4j.exception.WeixinException
微信刷脸支付,获取调用凭证- Parameters:
storeId
- 门店编号, 由商户定义, 各门店唯一。storeName
- 门店名称,由商户定义。(可用于展示)deviceId
- 终端设备编号,由商户定义。attach
- 附加字段。字段格式使用Json, 非必填rawdata
- 初始化数据。由微信人脸SDK的接口返回。- Returns:
- SDK调用凭证
- Throws:
com.foxinmy.weixin4j.exception.WeixinException
- See Also:
-
获取数据-getwxpayfacerawdata,
获取调用凭证-get-wxpayface-authinfo,
PayfaceAuthinfo
-
addProfitSharingReceiver
public ReceiverResult addProfitSharingReceiver(Receiver receiver) throws com.foxinmy.weixin4j.exception.WeixinException
添加分账接收方 服务商代子商户发起添加分账接收方请求,后续可通过发起分账请求将结算后的钱分到该分账接收方。- Parameters:
receiver
- 分帐接收方- Returns:
- Throws:
com.foxinmy.weixin4j.exception.WeixinException
- Since:
- weixin4j-pay 1.1.0
- See Also:
Receiver
,ReceiverResult
, 添加分账接收方
-
removeProfitSharingReceiver
public ReceiverResult removeProfitSharingReceiver(Receiver receiver) throws com.foxinmy.weixin4j.exception.WeixinException
删除分账接收方 商户发起删除分账接收方请求,删除后不支持将结算后的钱分到该分账接收方。- Parameters:
receiver
- 分帐接收方- Returns:
- Throws:
com.foxinmy.weixin4j.exception.WeixinException
- Since:
- weixin4j-pay 1.1.0
- See Also:
Receiver
,ReceiverResult
, 删除分账接收方
-
profitSharing
public ProfitSharingResult profitSharing(String transactionId, String outOrderNo, List<ReceiverProfit> receivers, Boolean multi) throws com.foxinmy.weixin4j.exception.WeixinException
请求分帐- Parameters:
transactionId
- 微信订单号outOrderNo
- 商户分帐单号receivers
- 分帐接收方列表multi
- 是否多次分帐,默认为单次分帐,即调用分帐成功后马上解冻剩余金额给商户,不需要完结分帐。多次分帐可多次调用分帐API,需调完结分帐结束分帐- Returns:
- Throws:
com.foxinmy.weixin4j.exception.WeixinException
- Since:
- weixin4j-pay 1.1.0
- See Also:
- 请求单次分帐
-
profitSharingQuery
public ProfitSharingResult profitSharingQuery(String transactionId, String outOrderNo) throws com.foxinmy.weixin4j.exception.WeixinException
分帐查询- Parameters:
transactionId
- 微信订单号outOrderNo
- 商户分帐单号- Returns:
- Throws:
com.foxinmy.weixin4j.exception.WeixinException
- Since:
- weixin4j-pay 1.1.0
- See Also:
- 分帐查询
-
profitSharingFinish
public ProfitSharingResult profitSharingFinish(String transactionId, String outOrderNo, String description) throws com.foxinmy.weixin4j.exception.WeixinException
完结分账 1、不需要进行分账的订单,可直接调用本接口将订单的金额全部解冻给本商户 2、调用多次分账接口后,需要解冻剩余资金时,调用本接口将剩余的分账金额全部解冻给特约商户 3、已调用请求单次分账后,剩余待分账金额为零,不需要再调用此接口。- Parameters:
transactionId
- 微信订单号outOrderNo
- 商户分帐单号description
- 分帐完结描述- Returns:
- Throws:
com.foxinmy.weixin4j.exception.WeixinException
- Since:
- weixin4j-pay 1.1.0
- See Also:
- 完结分账
-
profitSharingReturn
public ProfitSharingReturnResult profitSharingReturn(ProfitId id, String outReturnNo, ReturnAccountType returnAccountType, String returnAccount, int returnAmount, String description) throws com.foxinmy.weixin4j.exception.WeixinException
分账回退- Parameters:
id
- 分帐单号outReturnNo
- 商户回退单号returnAccountType
- 回退方类型returnAccount
- 回退方账号description
- 回退描述- Returns:
- Throws:
com.foxinmy.weixin4j.exception.WeixinException
- Since:
- weixin4j-pay 1.1.0
- See Also:
ProfitSharingReturnRequest
, 分账回退
-
profitSharingReturnQuery
public ProfitSharingReturnResult profitSharingReturnQuery(ProfitId id, String outReturnNo) throws com.foxinmy.weixin4j.exception.WeixinException
回退结果查询- Parameters:
id
- 分帐单号outReturnNo
- 商户回退单号- Returns:
- Throws:
com.foxinmy.weixin4j.exception.WeixinException
- See Also:
ProfitSharingReturnRequest
, 回退结果查询
-
-