mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-05-03 12:17:46 +08:00
🆕 #3138 【微信支付】增加接查询结算账户修改申请状态的接口
This commit is contained in:
parent
d470e9a693
commit
85c46ebf70
@ -0,0 +1,76 @@
|
||||
package com.github.binarywang.wxpay.bean.applyment;
|
||||
|
||||
import com.google.gson.annotations.SerializedName;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* 查询结算账户修改申请状态
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
@Accessors(chain = true)
|
||||
public class SettlementApplicationResult implements Serializable {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/**
|
||||
* 开户名称
|
||||
*/
|
||||
@SerializedName("account_name")
|
||||
private String accountName;
|
||||
|
||||
/**
|
||||
* 账户类型
|
||||
*/
|
||||
@SerializedName("account_type")
|
||||
private String accountType;
|
||||
|
||||
/**
|
||||
* 开户银行
|
||||
*/
|
||||
@SerializedName("account_bank")
|
||||
private String accountBank;
|
||||
|
||||
/**
|
||||
* 开户银行全称(含支行)
|
||||
*/
|
||||
@SerializedName("bank_name")
|
||||
private String bankName;
|
||||
|
||||
/**
|
||||
* 开户银行联行号
|
||||
*/
|
||||
@SerializedName("bank_branch_id")
|
||||
private String bankBranchId;
|
||||
|
||||
/**
|
||||
* 银行账号
|
||||
*/
|
||||
@SerializedName("account_number")
|
||||
private String accountNumber;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
@SerializedName("verify_result")
|
||||
private String verifyResult;
|
||||
|
||||
/**
|
||||
* 审核驳回原因
|
||||
*/
|
||||
@SerializedName("verify_fail_reason")
|
||||
private String verifyFailReason;
|
||||
|
||||
/**
|
||||
* 审核结果更新时间
|
||||
*/
|
||||
@SerializedName("verify_finish_time")
|
||||
private String verifyFinishTime;
|
||||
}
|
@ -71,4 +71,15 @@ public interface Applyment4SubService {
|
||||
*/
|
||||
String modifySettlement(String subMchid, ModifySettlementRequest request) throws WxPayException;
|
||||
|
||||
/**
|
||||
* 查询结算账户修改申请状态
|
||||
* 文档详见:https://pay.weixin.qq.com/docs/partner/apis/modify-settlement/sub-merchants/get-application.html
|
||||
* 接口链接:https://api.mch.weixin.qq.com/v3/apply4sub/sub_merchants/{sub_mchid}/application/{application_no}
|
||||
*
|
||||
* @param subMchid
|
||||
* @param applicationNo
|
||||
* @return
|
||||
* @throws WxPayException
|
||||
*/
|
||||
SettlementApplicationResult settlementApplication(String subMchid, String applicationNo) throws WxPayException;
|
||||
}
|
||||
|
@ -63,4 +63,11 @@ public class Applyment4SubServiceImpl implements Applyment4SubService {
|
||||
encryptFiled(request);
|
||||
return payService.postV3WithWechatpaySerial(url, GSON.toJson(request));
|
||||
}
|
||||
|
||||
@Override
|
||||
public SettlementApplicationResult settlementApplication(String subMchid, String applicationNo) throws WxPayException {
|
||||
String url = String.format("%s/v3/apply4sub/sub_merchants/%s/application/%s", this.payService.getPayBaseUrl(), subMchid, applicationNo);
|
||||
String result = payService.getV3(url);
|
||||
return GSON.fromJson(result, SettlementApplicationResult.class);
|
||||
}
|
||||
}
|
||||
|
@ -79,8 +79,14 @@ public class Applyment4SubServiceImplTest {
|
||||
applyment4SubService.modifySettlement(subMchid,modifySettlementRequest);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testSettlementApplication() throws WxPayException{
|
||||
Applyment4SubService applyment4SubService=new Applyment4SubServiceImpl(wxPayService);
|
||||
String subMchid="subMchid";
|
||||
String applymentId="applymentId";
|
||||
|
||||
|
||||
applyment4SubService.settlementApplication(subMchid, applymentId);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user