|
1 | 1 | package com.github.binarywang.wxpay.service; |
2 | 2 |
|
| 3 | +import com.github.binarywang.wxpay.bean.notify.SignatureHeader; |
3 | 4 | import com.github.binarywang.wxpay.bean.merchanttransfer.*; |
| 5 | +import com.github.binarywang.wxpay.bean.transfer.ReservationTransferBatchGetResult; |
| 6 | +import com.github.binarywang.wxpay.bean.transfer.ReservationTransferBatchRequest; |
| 7 | +import com.github.binarywang.wxpay.bean.transfer.ReservationTransferBatchResult; |
| 8 | +import com.github.binarywang.wxpay.bean.transfer.ReservationTransferNotifyResult; |
| 9 | +import com.github.binarywang.wxpay.bean.transfer.UserAuthorizationStatusResult; |
4 | 10 | import com.github.binarywang.wxpay.exception.WxPayException; |
5 | 11 |
|
6 | 12 | /** |
@@ -147,4 +153,86 @@ public interface MerchantTransferService { |
147 | 153 | * @throws WxPayException the wx pay exception |
148 | 154 | */ |
149 | 155 | DetailElectronicBillResult queryDetailElectronicBill(DetailElectronicBillRequest request) throws WxPayException; |
| 156 | + |
| 157 | + /** |
| 158 | + * 商户查询用户授权信息接口. |
| 159 | + * |
| 160 | + * 文档详见: https://pay.weixin.qq.com/doc/v3/merchant/4014399293 |
| 161 | + * 请求URL:https://api.mch.weixin.qq.com/v3/fund-app/mch-transfer/authorization/openid/{openid} |
| 162 | + * |
| 163 | + * @param openid 用户在直连商户应用下的用户标识 |
| 164 | + * @param transferSceneId 转账场景ID |
| 165 | + * @return 用户授权信息 |
| 166 | + * @throws WxPayException the wx pay exception |
| 167 | + */ |
| 168 | + UserAuthorizationStatusResult getUserAuthorizationStatus(String openid, String transferSceneId) throws WxPayException; |
| 169 | + |
| 170 | + /** |
| 171 | + * 批量预约商家转账接口. |
| 172 | + * |
| 173 | + * 文档详见: https://pay.weixin.qq.com/doc/v3/merchant/4014399293 |
| 174 | + * 请求URL:https://api.mch.weixin.qq.com/v3/fund-app/mch-transfer/reservation/transfer-batches |
| 175 | + * |
| 176 | + * @param request 批量预约商家转账请求参数 |
| 177 | + * @return 批量预约商家转账结果 |
| 178 | + * @throws WxPayException the wx pay exception |
| 179 | + */ |
| 180 | + ReservationTransferBatchResult reservationTransferBatch(ReservationTransferBatchRequest request) throws WxPayException; |
| 181 | + |
| 182 | + /** |
| 183 | + * 商户预约批次单号查询批次单接口. |
| 184 | + * |
| 185 | + * 文档详见: https://pay.weixin.qq.com/doc/v3/merchant/4014399293 |
| 186 | + * 请求URL:https://api.mch.weixin.qq.com/v3/fund-app/mch-transfer/reservation/transfer-batches/out-batch-no/{out_batch_no} |
| 187 | + * |
| 188 | + * @param outBatchNo 商户预约批次单号 |
| 189 | + * @param needQueryDetail 是否需要查询明细 |
| 190 | + * @param offset 分页偏移量 |
| 191 | + * @param limit 分页大小 |
| 192 | + * @param detailState 明细状态(PROCESSING/SUCCESS/FAIL) |
| 193 | + * @return 批量预约商家转账批次查询结果 |
| 194 | + * @throws WxPayException the wx pay exception |
| 195 | + */ |
| 196 | + ReservationTransferBatchGetResult getReservationTransferBatchByOutBatchNo(String outBatchNo, Boolean needQueryDetail, |
| 197 | + Integer offset, Integer limit, String detailState) throws WxPayException; |
| 198 | + |
| 199 | + /** |
| 200 | + * 微信预约批次单号查询批次单接口. |
| 201 | + * |
| 202 | + * 文档详见: https://pay.weixin.qq.com/doc/v3/merchant/4014399293 |
| 203 | + * 请求URL:https://api.mch.weixin.qq.com/v3/fund-app/mch-transfer/reservation/transfer-batches/reservation-batch-no/{reservation_batch_no} |
| 204 | + * |
| 205 | + * @param reservationBatchNo 微信预约批次单号 |
| 206 | + * @param needQueryDetail 是否需要查询明细 |
| 207 | + * @param offset 分页偏移量 |
| 208 | + * @param limit 分页大小 |
| 209 | + * @param detailState 明细状态(PROCESSING/SUCCESS/FAIL) |
| 210 | + * @return 批量预约商家转账批次查询结果 |
| 211 | + * @throws WxPayException the wx pay exception |
| 212 | + */ |
| 213 | + ReservationTransferBatchGetResult getReservationTransferBatchByReservationBatchNo(String reservationBatchNo, Boolean needQueryDetail, |
| 214 | + Integer offset, Integer limit, String detailState) throws WxPayException; |
| 215 | + |
| 216 | + /** |
| 217 | + * 解析预约商家转账通知回调结果. |
| 218 | + * |
| 219 | + * 文档详见: https://pay.weixin.qq.com/doc/v3/merchant/4014399293 |
| 220 | + * |
| 221 | + * @param notifyData 通知数据 |
| 222 | + * @param header 通知头部数据,不传则表示不校验头 |
| 223 | + * @return 预约商家转账通知结果 |
| 224 | + * @throws WxPayException the wx pay exception |
| 225 | + */ |
| 226 | + ReservationTransferNotifyResult parseReservationTransferNotifyResult(String notifyData, SignatureHeader header) throws WxPayException; |
| 227 | + |
| 228 | + /** |
| 229 | + * 关闭预约商家转账批次接口. |
| 230 | + * |
| 231 | + * 文档详见: https://pay.weixin.qq.com/doc/v3/merchant/4014399293 |
| 232 | + * 请求URL:https://api.mch.weixin.qq.com/v3/fund-app/mch-transfer/reservation/transfer-batches/out-batch-no/{out_batch_no}/close |
| 233 | + * |
| 234 | + * @param outBatchNo 商户预约批次单号 |
| 235 | + * @throws WxPayException the wx pay exception |
| 236 | + */ |
| 237 | + void closeReservationTransferBatch(String outBatchNo) throws WxPayException; |
150 | 238 | } |
0 commit comments