类 WechatMarketingBusiFavorApi
- java.lang.Object
-
- cn.crushes.cloud.core.pay.wechat.v3.AbstractApi
-
- cn.crushes.cloud.core.pay.wechat.v3.WechatMarketingBusiFavorApi
-
public class WechatMarketingBusiFavorApi extends AbstractApi
微信支付商家券.- 作者:
- youta
-
-
构造器概要
构造器 构造器 说明 WechatMarketingBusiFavorApi(WechatPayClient wechatPayClient, String tenantId)Instantiates a new Abstract api.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 WechatResponseEntity<com.fasterxml.jackson.databind.node.ObjectNode>associate(BusiFavorAssociateInfo associateInfo)商家券关联订单信息APIprivate org.springframework.http.RequestEntity<?>associateFunction(WechatPayV3Type type, BusiFavorAssociateInfo associateInfo)associate and disassociate functionWechatResponseEntity<com.fasterxml.jackson.databind.node.ObjectNode>budget(BusiFavorBudgetParams params)修改批次预算APIWechatResponseEntity<com.fasterxml.jackson.databind.node.ObjectNode>createStock(BusiFavorCreateParams params)创建商家券券批次APIprivate org.springframework.http.RequestEntity<?>createStocksFunction(WechatPayV3Type type, BusiFavorCreateParams busiFavorCreateParams)WechatResponseEntity<com.fasterxml.jackson.databind.node.ObjectNode>deactivate(BusiFavorDeactivateParams params)使券失效APIWechatResponseEntity<com.fasterxml.jackson.databind.node.ObjectNode>disassociate(BusiFavorAssociateInfo associateInfo)商家券取消关联订单信息APIWechatResponseEntity<com.fasterxml.jackson.databind.node.ObjectNode>getCallbacks(String mchId)查询商家券事件通知地址APIWechatResponseEntity<com.fasterxml.jackson.databind.node.ObjectNode>queryStockDetail(String stockId)查询商家券详情APIWechatResponseEntity<com.fasterxml.jackson.databind.node.ObjectNode>queryUserCoupon(UserBusiCouponQueryParams params)查询用户单张券详情APIWechatResponseEntity<com.fasterxml.jackson.databind.node.ObjectNode>queryUserStocks(UserBusiFavorQueryParams params)根据过滤条件查询用户券APIWechatResponseEntity<com.fasterxml.jackson.databind.node.ObjectNode>refund(BusiFavorRefundParams params)申请退券APIWechatResponseEntity<com.fasterxml.jackson.databind.node.ObjectNode>setCallbacks(BusiFavorCallbackSettingParams params)设置商家券事件通知地址APIWechatResponseEntity<com.fasterxml.jackson.databind.node.ObjectNode>updateStock(BusiFavorUpdateParams params)修改商家券基本信息APIWechatResponseEntity<com.fasterxml.jackson.databind.node.ObjectNode>uploadCouponCodes(BusiCouponCodeUploadParams params)上传预存code APIWechatResponseEntity<com.fasterxml.jackson.databind.node.ObjectNode>use(BusiFavorUseParams params)核销用户券API,暂时appid需要手工在参数中传递-
从类继承的方法 cn.crushes.cloud.core.pay.wechat.v3.AbstractApi
billDownload, billResource, client, container, downloadFundFlowBill, downloadTradeBill, Get, Get, getMapper, Patch, Post, Post, tenantId, wechatMetaBean
-
-
-
-
构造器详细资料
-
WechatMarketingBusiFavorApi
public WechatMarketingBusiFavorApi(WechatPayClient wechatPayClient, String tenantId)
Instantiates a new Abstract api.- 参数:
wechatPayClient- the wechat pay clienttenantId- the tenant id
-
-
方法详细资料
-
createStock
public WechatResponseEntity<com.fasterxml.jackson.databind.node.ObjectNode> createStock(BusiFavorCreateParams params)
创建商家券券批次API商家券介绍详见 微信支付商家券
- 参数:
params- the params- 返回:
- the wechat response entity
-
createStocksFunction
private org.springframework.http.RequestEntity<?> createStocksFunction(WechatPayV3Type type, BusiFavorCreateParams busiFavorCreateParams)
-
queryStockDetail
public WechatResponseEntity<com.fasterxml.jackson.databind.node.ObjectNode> queryStockDetail(String stockId)
查询商家券详情API商户可通过该接口查询已创建的商家券批次详情信息。
- 参数:
stockId- the stock id- 返回:
- the wechat response entity
-
use
public WechatResponseEntity<com.fasterxml.jackson.databind.node.ObjectNode> use(BusiFavorUseParams params)
核销用户券API,暂时appid需要手工在参数中传递在用户满足优惠门槛后,服务商可通过该接口核销用户微信卡包中具体某一张商家券。
- 参数:
params- the params- 返回:
- the wechat response entity
-
queryUserStocks
public WechatResponseEntity<com.fasterxml.jackson.databind.node.ObjectNode> queryUserStocks(UserBusiFavorQueryParams params)
根据过滤条件查询用户券API商户自定义筛选条件(如创建商户号、归属商户号、发放商户号等),查询指定微信用户卡包中满足对应条件的所有商家券信息。
- 参数:
params- the params- 返回:
- the wechat response entity
-
queryUserCoupon
public WechatResponseEntity<com.fasterxml.jackson.databind.node.ObjectNode> queryUserCoupon(UserBusiCouponQueryParams params)
查询用户单张券详情API服务商可通过该接口查询微信用户卡包中某一张商家券的详情信息。
- 参数:
params- the params- 返回:
- the wechat response entity
-
uploadCouponCodes
public WechatResponseEntity<com.fasterxml.jackson.databind.node.ObjectNode> uploadCouponCodes(BusiCouponCodeUploadParams params)
上传预存code API商家券的Code码可由微信后台随机分配,同时支持商户自定义。 如商家已有自己的优惠券系统,可直接使用自定义模式。 即商家预先向微信支付上传券Code,当券在发放时,微信支付自动从已导入的Code中随机取值(不能指定),派发给用户。
- 参数:
params- the params- 返回:
- wechat response entity
-
setCallbacks
public WechatResponseEntity<com.fasterxml.jackson.databind.node.ObjectNode> setCallbacks(BusiFavorCallbackSettingParams params)
设置商家券事件通知地址API用于设置接收商家券相关事件通知的URL,可接收商家券相关的事件通知、包括发放通知等。 需要设置接收通知的URL,并在商户平台开通 营销事件推送 的能力,即可接收到相关通知。
营销事件推送:点击开通产品权限。由商家券批次创建方登录Pay平台,操作开通
注意:
- 仅可以收到由商户自己创建的批次相关的通知
- 需要设置apiv3秘钥,否则无法收到回调。
- 如果需要领券回调中的参数openid。需要创券时候传入 notify_appid参数。
- 参数:
params- the params- 返回:
- callbacks callbacks
-
getCallbacks
public WechatResponseEntity<com.fasterxml.jackson.databind.node.ObjectNode> getCallbacks(String mchId)
查询商家券事件通知地址API通过调用此接口可查询设置的通知URL。
注意:
- 仅可以查询由请求商户号设置的商家券通知url
- 参数:
mchId- the mch id- 返回:
- callbacks callbacks
-
associate
public WechatResponseEntity<com.fasterxml.jackson.databind.node.ObjectNode> associate(BusiFavorAssociateInfo associateInfo)
商家券关联订单信息API将有效态(未核销)的商家券与订单信息关联,用于后续参与摇奖以及返佣激励等操作的统计。
注意: 仅对有关联订单需求的券进行该操作
- 参数:
associateInfo- the associate info- 返回:
- wechat response entity
-
disassociate
public WechatResponseEntity<com.fasterxml.jackson.databind.node.ObjectNode> disassociate(BusiFavorAssociateInfo associateInfo)
商家券取消关联订单信息API取消商家券与订单信息的关联关系。
注意: 建议取消前调用查询接口,查到当前关联的商户单号并确认后,再进行取消操作
- 参数:
associateInfo- the associate info- 返回:
- wechat response entity
-
associateFunction
private org.springframework.http.RequestEntity<?> associateFunction(WechatPayV3Type type, BusiFavorAssociateInfo associateInfo)
associate and disassociate function- 参数:
type- WechatPayV3TypeassociateInfo- the associateInfo- 返回:
- RequestEntity
-
budget
public WechatResponseEntity<com.fasterxml.jackson.databind.node.ObjectNode> budget(BusiFavorBudgetParams params)
修改批次预算API商户可以通过该接口修改批次单天发放上限数量或者批次最大发放数量
- 参数:
params- the params- 返回:
- wechat response entity
-
updateStock
public WechatResponseEntity<com.fasterxml.jackson.databind.node.ObjectNode> updateStock(BusiFavorUpdateParams params)
修改商家券基本信息API商户可以通过该接口修改商家券基本信息
- 参数:
params- the params- 返回:
- wechat response entity
-
refund
public WechatResponseEntity<com.fasterxml.jackson.databind.node.ObjectNode> refund(BusiFavorRefundParams params)
申请退券API商户可以通过该接口为已核销的券申请退券
- 参数:
params- the params- 返回:
- wechat response entity
-
deactivate
public WechatResponseEntity<com.fasterxml.jackson.databind.node.ObjectNode> deactivate(BusiFavorDeactivateParams params)
使券失效API前置条件:券的状态为
CouponStatus.SENDED商户可以通过该接口将可用券进行失效处理,券被失效后无法再被核销
- 参数:
params- the params- 返回:
- wechat response entity
-
-