diff --git a/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/enumeration/WechatPayV3Type.java b/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/enumeration/WechatPayV3Type.java index 3ff61a3..f605562 100644 --- a/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/enumeration/WechatPayV3Type.java +++ b/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/enumeration/WechatPayV3Type.java @@ -991,7 +991,44 @@ public enum WechatPayV3Type { * * @since 1.0.14.RELEASE */ - MALL_SCORE_RESULT(HttpMethod.GET, "%s/v3/businesscircle/user-authorizations/{openid}"); + MALL_SCORE_RESULT(HttpMethod.GET, "%s/v3/businesscircle/user-authorizations/{openid}"), + //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + /** + * 获取对私银行卡号开户银行API + * + * @since 1.0.14.RELEASE + */ + CAPITAL_SEARCH(HttpMethod.GET, "%s/v3/capital/capitallhh/banks/search-banks-by-bank-account"), + /** + * 查询支持个人业务的银行列表API + * + * @since 1.0.14.RELEASE + */ + CAPITAL_PERSONAL(HttpMethod.GET, "%s/v3/capital/capitallhh/banks/personal-banking"), + /** + * 查询支持对公业务的银行列表API + * + * @since 1.0.14.RELEASE + */ + CAPITAL_CORPORATE(HttpMethod.GET, "%s/v3/capital/capitallhh/banks/corporate-banking"), + /** + * 查询省份列表API + * + * @since 1.0.14.RELEASE + */ + CAPITAL_PROVINCES(HttpMethod.GET, "%s/v3/capital/capitallhh/areas/provinces"), + /** + * 查询城市列表API + * + * @since 1.0.14.RELEASE + */ + CAPITAL_CITIES(HttpMethod.GET, "%s/v3/capital/capitallhh/areas/provinces/{province_code}/cities"), + /** + * 查询支行列表API + * + * @since 1.0.14.RELEASE + */ + CAPITAL_BRANCHES(HttpMethod.GET, "%s/v3/capital/capitallhh/banks/{bank_alias_code}/branches"); /** * The Pattern. diff --git a/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/BranchBanksPageParams.java b/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/BranchBanksPageParams.java new file mode 100644 index 0000000..2d3c3e9 --- /dev/null +++ b/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/BranchBanksPageParams.java @@ -0,0 +1,16 @@ +package cn.felord.payment.wechat.v3; + +import cn.felord.payment.wechat.v3.model.PageParams; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * @author felord.cn + * @since 1.0.14.RELEASE + */ +@EqualsAndHashCode(callSuper = true) +@Data +public class BranchBanksPageParams extends PageParams { + private String bankAliasCode; + private Integer cityCode; +} diff --git a/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/WechatApiProvider.java b/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/WechatApiProvider.java index 29dd179..8bac31e 100644 --- a/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/WechatApiProvider.java +++ b/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/WechatApiProvider.java @@ -304,4 +304,15 @@ public class WechatApiProvider { return new WechatMediaApi(wechatPayClient, tenantId); } + /** + * 其它能力-银行组件(服务商) + * + * @param tenantId the tenant id + * @return the wechat media api + * @since 1.0.14.RELEASE + */ + public WechatCapitalApi capitalApi(String tenantId) { + return new WechatCapitalApi(wechatPayClient, tenantId); + } + } diff --git a/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/WechatCapitalApi.java b/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/WechatCapitalApi.java new file mode 100644 index 0000000..8da9d6d --- /dev/null +++ b/payment-spring-boot-autoconfigure/src/main/java/cn/felord/payment/wechat/v3/WechatCapitalApi.java @@ -0,0 +1,163 @@ +package cn.felord.payment.wechat.v3; + +import cn.felord.payment.wechat.enumeration.WeChatServer; +import cn.felord.payment.wechat.enumeration.WechatPayV3Type; +import cn.felord.payment.wechat.v3.model.PageParams; +import com.fasterxml.jackson.databind.node.ObjectNode; +import org.springframework.web.util.UriComponentsBuilder; + +import java.net.URI; +import java.security.cert.X509Certificate; + +/** + * 其它能力-银行组件(服务商) + *
+ * 具体参见 银行组件
+ *
+ * @author felord.cn
+ * @since 1.0.14.RELEASE
+ */
+public class WechatCapitalApi extends AbstractApi{
+ /**
+ * Instantiates a new Abstract api.
+ *
+ * @param wechatPayClient the wechat pay client
+ * @param tenantId the tenant id
+ */
+ public WechatCapitalApi(WechatPayClient wechatPayClient, String tenantId) {
+ super(wechatPayClient, tenantId);
+ }
+
+ /**
+ * 获取对私银行卡号开户银行API
+ *
+ * @param accountNumber accountNumber
+ * @return the wechat response entity
+ */
+ public WechatResponseEntity