🎨 #1832 微信支付电商收付通增加查询提现状态的接口

This commit is contained in:
f00lish
2020-10-31 16:47:21 +08:00
committed by GitHub
parent 7eb11c8799
commit 73f30b1a82
4 changed files with 427 additions and 0 deletions

View File

@@ -339,6 +339,31 @@ public interface EcommerceService {
*/
SpWithdrawResult spWithdraw(SpWithdrawRequest request) throws WxPayException;
/**
* <pre>
* 二级商户查询提现状态API
* 文档地址: https://pay.weixin.qq.com/wiki/doc/apiv3/wxpay/ecommerce/fund/chapter3_3.shtml
* </pre>
*
* @param subMchid 二级商户号
* @param outRequestNo 商户提现单号
* @return 返回数据 return sub withdraw status result
* @throws WxPayException the wx pay exception
*/
SubWithdrawStatusResult querySubWithdrawByOutRequestNo(String subMchid, String outRequestNo) throws WxPayException;
/**
* <pre>
* 电商平台查询提现状态API
* 文档地址: https://pay.weixin.qq.com/wiki/doc/apiv3/wxpay/ecommerce/fund/chapter3_6.shtml
* </pre>
*
* @param outRequestNo 商户提现单号
* @return 返回数据 return sp withdraw status result
* @throws WxPayException the wx pay exception
*/
SpWithdrawStatusResult querySpWithdrawByOutRequestNo(String outRequestNo) throws WxPayException;
/**
* <pre>
* 修改结算帐号API

View File

@@ -266,6 +266,20 @@ public class EcommerceServiceImpl implements EcommerceService {
return GSON.fromJson(response, SpWithdrawResult.class);
}
@Override
public SubWithdrawStatusResult querySubWithdrawByOutRequestNo(String subMchid, String outRequestNo) throws WxPayException {
String url = String.format("%s/v3/ecommerce/fund/withdraw/out-request-no/%s?sub_mchid=%s", this.payService.getPayBaseUrl(), outRequestNo, subMchid);
String response = this.payService.getV3(URI.create(url));
return GSON.fromJson(response, SubWithdrawStatusResult.class);
}
@Override
public SpWithdrawStatusResult querySpWithdrawByOutRequestNo(String outRequestNo) throws WxPayException {
String url = String.format("%s/v3/merchant/fund/withdraw/out-request-no/%s", this.payService.getPayBaseUrl(), outRequestNo);
String response = this.payService.getV3(URI.create(url));
return GSON.fromJson(response, SpWithdrawStatusResult.class);
}
@Override
public void modifySettlement(String subMchid, SettlementRequest request) throws WxPayException {
String url = String.format("%s/v3/apply4sub/sub_merchants/%s/modify-settlement", this.payService.getPayBaseUrl(), subMchid);