mirror of
https://github.com/dromara/payment-spring-boot.git
synced 2026-03-14 05:43:46 +08:00
微信支付完善
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
package cn.felord.payment.wechat.v3;
|
||||
|
||||
/**
|
||||
* The type Wechat api provider.
|
||||
* 微信支付工具.
|
||||
*
|
||||
* @author Dax
|
||||
* @since 17 :32
|
||||
@@ -29,13 +29,13 @@ public class WechatApiProvider {
|
||||
}
|
||||
|
||||
/**
|
||||
* 支付.
|
||||
* 普通支付-直连模式.
|
||||
*
|
||||
* @param tenantId the tenant id
|
||||
* @return the wechat pay api
|
||||
*/
|
||||
public WechatPayApi payApi(String tenantId){
|
||||
return new WechatPayApi(wechatPayClient,tenantId);
|
||||
public WechatDirectPayApi directPayApi(String tenantId){
|
||||
return new WechatDirectPayApi(wechatPayClient,tenantId);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -14,12 +14,12 @@ import org.springframework.web.util.UriComponentsBuilder;
|
||||
import java.net.URI;
|
||||
|
||||
/**
|
||||
* The type Wechat pay api.
|
||||
* 普通支付-直连模式.
|
||||
*
|
||||
* @author Dax
|
||||
* @since 16 :15
|
||||
*/
|
||||
public class WechatPayApi extends AbstractApi {
|
||||
public class WechatDirectPayApi extends AbstractApi {
|
||||
|
||||
/**
|
||||
* Instantiates a new Wechat pay api.
|
||||
@@ -27,7 +27,7 @@ public class WechatPayApi extends AbstractApi {
|
||||
* @param wechatPayClient the wechat pay client
|
||||
* @param tenantId the tenant id
|
||||
*/
|
||||
public WechatPayApi(WechatPayClient wechatPayClient, String tenantId) {
|
||||
public WechatDirectPayApi(WechatPayClient wechatPayClient, String tenantId) {
|
||||
super(wechatPayClient, tenantId);
|
||||
}
|
||||
|
||||
@@ -261,7 +261,6 @@ public class WechatPayClient {
|
||||
|
||||
messageConverters.removeIf(httpMessageConverter -> httpMessageConverter instanceof AllEncompassingFormHttpMessageConverter);
|
||||
messageConverters.add(new ExtensionFormHttpMessageConverter());
|
||||
// messageConverters.add(new DownloadHttpMessageConverter(MediaType.asMediaType(MimeType.valueOf("text/plain;charset=utf-8"))));
|
||||
restTemplate.setMessageConverters(messageConverters);
|
||||
this.restOperations = restTemplate;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user