This commit is contained in:
felord.cn
2020-12-02 23:33:32 +08:00
parent c9fae03a5c
commit 0dce021259
3 changed files with 10 additions and 9 deletions

View File

@@ -5,7 +5,9 @@
- [x] **微信支付V3** 全量支持。 - [x] **微信支付V3** 全量支持。
- [x] **支付宝** 提供所有实现,具体以签约项目为准。 - [x] **支付宝** 提供所有实现,具体以签约项目为准。
- [ ] **银联支付** 施工中…… ## 进度
- 微信支付营销-代金券 `WechatMarketingFavorApi` 100%
- 微信支付 支付功能 `WechatPayApi` app预支付
## 采用技术 ## 采用技术
- Spring - Spring
@@ -62,7 +64,7 @@ public class PayConfig {
@Autowired @Autowired
WechatPayApi wechatPayV3Api; WechatPayApi wechatPayV3Api;
@Autowired @Autowired
WechatMarketingApi wchatMarketingApi; WechatMarketingFavorApi wechatMarketingFavorApi;
``` ```
###### V3 ###### V3
例如V3 查询商户下的优惠券 例如V3 查询商户下的优惠券
@@ -74,7 +76,7 @@ public class PayConfig {
StocksQueryParams params = new StocksQueryParams(); StocksQueryParams params = new StocksQueryParams();
params.setOffset(0); params.setOffset(0);
params.setLimit(10); params.setLimit(10);
WechatResponseEntity<ObjectNode> objectNodeWechatResponseEntity = wchatMarketingApi.queryStocksByMch(params); WechatResponseEntity<ObjectNode> objectNodeWechatResponseEntity = wechatMarketingFavorApi.queryStocksByMch(params);
System.out.println("objectNodeWechatResponseEntity = " + objectNodeWechatResponseEntity); System.out.println("objectNodeWechatResponseEntity = " + objectNodeWechatResponseEntity);
} }
``` ```

View File

@@ -3,7 +3,6 @@ package cn.felord.payment.wechat;
import cn.felord.payment.wechat.oauth2.OAuth2AuthorizationRequestRedirectProvider; import cn.felord.payment.wechat.oauth2.OAuth2AuthorizationRequestRedirectProvider;
import cn.felord.payment.wechat.v3.*; import cn.felord.payment.wechat.v3.*;
import cn.felord.payment.wechat.v3.*;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties; import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
@@ -77,8 +76,8 @@ public class WechatPayConfiguration {
* @return the wechat marketing api * @return the wechat marketing api
*/ */
@Bean @Bean
public WechatMarketingApi wechatMarketingApi(WechatPayClient wechatPayClient, WechatMetaBean wechatMetaBean) { public WechatMarketingFavorApi wechatMarketingApi(WechatPayClient wechatPayClient, WechatMetaBean wechatMetaBean) {
return new WechatMarketingApi(wechatPayClient, wechatMetaBean); return new WechatMarketingFavorApi(wechatPayClient, wechatMetaBean);
} }
/** /**

View File

@@ -29,19 +29,19 @@ import java.util.Objects;
import java.util.function.Consumer; import java.util.function.Consumer;
/** /**
* The type Wechat marketing api. * 微信支付营销代金券API
* *
* @author Dax * @author Dax
* @since 18 :22 * @since 18 :22
*/ */
public class WechatMarketingApi extends AbstractApi { public class WechatMarketingFavorApi extends AbstractApi {
/** /**
* Instantiates a new Wechat marketing api. * Instantiates a new Wechat marketing api.
* *
* @param wechatPayClient the wechat pay client * @param wechatPayClient the wechat pay client
* @param wechatMetaBean the wechat meta bean * @param wechatMetaBean the wechat meta bean
*/ */
public WechatMarketingApi(WechatPayClient wechatPayClient, WechatMetaBean wechatMetaBean) { public WechatMarketingFavorApi(WechatPayClient wechatPayClient, WechatMetaBean wechatMetaBean) {
super(wechatPayClient, wechatMetaBean); super(wechatPayClient, wechatMetaBean);
} }