mirror of
https://github.com/dromara/payment-spring-boot.git
synced 2026-03-14 05:43:46 +08:00
解决冲突
This commit is contained in:
15
README.md
15
README.md
@@ -1,6 +1,6 @@
|
||||
[](https://github.com/NotFound403/payment-spring-boot/actions/workflows/main.yml)
|
||||
|
||||
# 最好用的微信支付V3 Spring Boot 组件
|
||||
# 最好用的微信支付V3 Spring Boot 组件
|
||||
|
||||
为了满足业务中出现app支付、公众号支付、小程序支付等多appid并存的场景,对原有的进行了增强开发出了多租户版本。
|
||||
|
||||
@@ -24,6 +24,7 @@
|
||||
- [payment-spring-boot GitHub文档](https://notfound403.github.io/payment-spring-boot)
|
||||
- [payment-spring-boot Gitee文档](https://felord.gitee.io/payment-spring-boot)
|
||||
|
||||
|
||||
## 目前已经实现所有服务商和直连商户接口
|
||||
|
||||
- 实现微信支付多商户
|
||||
@@ -56,11 +57,11 @@
|
||||
- `WechatPayTransfersApi` 微信支付V2企业付款到零钱,目前不包括到银行卡
|
||||
- `WechatDirectPayApi` 微信支付直连模式V3普通支付
|
||||
- `WechatPayScoreParkingApi` 微信支付分V3停车服务
|
||||
- `WechatBatchTransferApi` 微信支付V3批量转账到零钱
|
||||
- `WechatPartnerSpecialMchApi` 微信支付V3服务商商户进件
|
||||
- `WechatMediaApi` 微信支付V3媒体上传
|
||||
- `WechatEcommerceApi` 电商收付通
|
||||
- `WechatSmartGuideApi` 服务商或者直连商户-经营能力-支付即服务
|
||||
- `WechatBatchTransferApi` 微信支付V3批量转账到零钱
|
||||
- `WechatPartnerSpecialMchApi` 微信支付V3服务商商户进件
|
||||
- `WechatMediaApi` 微信支付V3媒体上传
|
||||
- `WechatEcommerceApi` 电商收付通
|
||||
- `WechatSmartGuideApi` 服务商或者直连商户-经营能力-支付即服务
|
||||
- `WechatGoldPlanApi` 服务商-经营能力-点金计划
|
||||
|
||||
> 随着版本迭代功能会增加。
|
||||
@@ -71,7 +72,7 @@
|
||||
## 仓库地址
|
||||
- [GitHub](https://github.com/NotFound403/payment-spring-boot)
|
||||
- [Gitee](https://gitee.com/felord/payment-spring-boot)
|
||||
|
||||
|
||||
## QQ交流群
|
||||
为了交流解惑,新建QQ群,可通过扫码进入。
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ public class WechatBatchTransferApi extends AbstractApi {
|
||||
List<CreateBatchTransferParams.TransferDetailListItem> encrypted = transferDetailList.stream()
|
||||
.peek(transferDetailListItem -> {
|
||||
String userName = transferDetailListItem.getUserName();
|
||||
if (StringUtils.hasText(userName)){
|
||||
if (StringUtils.hasText(userName)) {
|
||||
String encryptedUserName = signatureProvider.encryptRequestMessage(userName, x509Certificate);
|
||||
transferDetailListItem.setUserName(encryptedUserName);
|
||||
}
|
||||
@@ -112,7 +112,20 @@ public class WechatBatchTransferApi extends AbstractApi {
|
||||
public WechatResponseEntity<ObjectNode> queryBatchByBatchId(QueryBatchTransferParams queryBatchTransferParams) {
|
||||
WechatResponseEntity<ObjectNode> wechatResponseEntity = new WechatResponseEntity<>();
|
||||
this.client().withType(WechatPayV3Type.BATCH_TRANSFER_BATCH_ID, queryBatchTransferParams)
|
||||
.function(this::apply)
|
||||
.function((type, params) -> {
|
||||
MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<>();
|
||||
queryParams.add("need_query_detail", params.getNeedQueryDetail().toString());
|
||||
queryParams.add("offset", params.getOffset().toString());
|
||||
queryParams.add("limit", params.getLimit().toString());
|
||||
queryParams.add("detail_status", params.getDetailStatus().name());
|
||||
|
||||
URI uri = UriComponentsBuilder.fromHttpUrl(type.uri(WeChatServer.CHINA))
|
||||
.queryParams(queryParams)
|
||||
.build()
|
||||
.expand(params.getCode())
|
||||
.toUri();
|
||||
return Get(uri);
|
||||
})
|
||||
.consumer(wechatResponseEntity::convert)
|
||||
.request();
|
||||
return wechatResponseEntity;
|
||||
@@ -391,19 +404,4 @@ public class WechatBatchTransferApi extends AbstractApi {
|
||||
.request();
|
||||
return wechatResponseEntity;
|
||||
}
|
||||
|
||||
private RequestEntity<?> apply(WechatPayV3Type type, QueryBatchTransferParams params) {
|
||||
MultiValueMap<String, String> queryParams = new LinkedMultiValueMap<>();
|
||||
queryParams.add("need_query_detail", params.getNeedQueryDetail().toString());
|
||||
queryParams.add("offset", params.getOffset().toString());
|
||||
queryParams.add("limit", params.getLimit().toString());
|
||||
queryParams.add("detail_status", params.getDetailStatus().name());
|
||||
|
||||
URI uri = UriComponentsBuilder.fromHttpUrl(type.uri(WeChatServer.CHINA))
|
||||
.queryParams(queryParams)
|
||||
.build()
|
||||
.expand(params.getCode())
|
||||
.toUri();
|
||||
return Get(uri);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user