mirror of
https://github.com/dromara/payment-spring-boot.git
synced 2026-03-14 05:43:46 +08:00
微信支付完善
This commit is contained in:
@@ -4,10 +4,10 @@
|
|||||||
## 支持类型
|
## 支持类型
|
||||||
|
|
||||||
- [x] **微信支付V3** 全量支持,并支持多租户。
|
- [x] **微信支付V3** 全量支持,并支持多租户。
|
||||||
- [x] **支付宝** 提供所有实现,具体以签约项目为准。
|
- [x] **支付宝** 集成SDK,作简单适配。
|
||||||
## 进度
|
## 进度
|
||||||
- 微信支付营销-代金券 `WechatMarketingFavorApi` 100%
|
- 微信支付营销-代金券 `WechatMarketingFavorApi` 100%
|
||||||
- 微信支付 支付功能 `WechatPayApi` 100%
|
- 微信支付 支付功能-普通支付直连模式 `WechatDirectPayApi` 100%
|
||||||
|
|
||||||
## 采用技术
|
## 采用技术
|
||||||
- Spring
|
- Spring
|
||||||
@@ -158,4 +158,5 @@ ali:
|
|||||||
## CHANGELOG
|
## CHANGELOG
|
||||||
### 1.0.0.RELEASE
|
### 1.0.0.RELEASE
|
||||||
|
|
||||||
- 支持微信支付V3、支付宝支付
|
- 支持微信支付V3、支付宝支付
|
||||||
|
- 微信支付多租户
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
package cn.felord.payment.wechat.v3;
|
package cn.felord.payment.wechat.v3;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The type Wechat api provider.
|
* 微信支付工具.
|
||||||
*
|
*
|
||||||
* @author Dax
|
* @author Dax
|
||||||
* @since 17 :32
|
* @since 17 :32
|
||||||
@@ -29,13 +29,13 @@ public class WechatApiProvider {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 支付.
|
* 普通支付-直连模式.
|
||||||
*
|
*
|
||||||
* @param tenantId the tenant id
|
* @param tenantId the tenant id
|
||||||
* @return the wechat pay api
|
* @return the wechat pay api
|
||||||
*/
|
*/
|
||||||
public WechatPayApi payApi(String tenantId){
|
public WechatDirectPayApi directPayApi(String tenantId){
|
||||||
return new WechatPayApi(wechatPayClient,tenantId);
|
return new WechatDirectPayApi(wechatPayClient,tenantId);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -14,12 +14,12 @@ import org.springframework.web.util.UriComponentsBuilder;
|
|||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The type Wechat pay api.
|
* 普通支付-直连模式.
|
||||||
*
|
*
|
||||||
* @author Dax
|
* @author Dax
|
||||||
* @since 16 :15
|
* @since 16 :15
|
||||||
*/
|
*/
|
||||||
public class WechatPayApi extends AbstractApi {
|
public class WechatDirectPayApi extends AbstractApi {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Instantiates a new Wechat pay api.
|
* Instantiates a new Wechat pay api.
|
||||||
@@ -27,7 +27,7 @@ public class WechatPayApi extends AbstractApi {
|
|||||||
* @param wechatPayClient the wechat pay client
|
* @param wechatPayClient the wechat pay client
|
||||||
* @param tenantId the tenant id
|
* @param tenantId the tenant id
|
||||||
*/
|
*/
|
||||||
public WechatPayApi(WechatPayClient wechatPayClient, String tenantId) {
|
public WechatDirectPayApi(WechatPayClient wechatPayClient, String tenantId) {
|
||||||
super(wechatPayClient, tenantId);
|
super(wechatPayClient, tenantId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -261,7 +261,6 @@ public class WechatPayClient {
|
|||||||
|
|
||||||
messageConverters.removeIf(httpMessageConverter -> httpMessageConverter instanceof AllEncompassingFormHttpMessageConverter);
|
messageConverters.removeIf(httpMessageConverter -> httpMessageConverter instanceof AllEncompassingFormHttpMessageConverter);
|
||||||
messageConverters.add(new ExtensionFormHttpMessageConverter());
|
messageConverters.add(new ExtensionFormHttpMessageConverter());
|
||||||
// messageConverters.add(new DownloadHttpMessageConverter(MediaType.asMediaType(MimeType.valueOf("text/plain;charset=utf-8"))));
|
|
||||||
restTemplate.setMessageConverters(messageConverters);
|
restTemplate.setMessageConverters(messageConverters);
|
||||||
this.restOperations = restTemplate;
|
this.restOperations = restTemplate;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user