Skip to content

Commit f4df8d2

Browse files
committed
docs: 现在可以通过API清单检索相关的API了
1 parent fec2468 commit f4df8d2

3 files changed

Lines changed: 269 additions & 157 deletions

File tree

README.md

Lines changed: 26 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
21
<div align="center" style="margin-bottom: 10px"><h1>最全最好用的微信支付V3 Spring Boot 组件</h1></div>
32

43
<p align="center">
@@ -33,22 +32,26 @@
3332

3433
## 简介
3534

36-
Java微信支付V3支付Spring Boot Starter,支持微信优惠券,代金券、商家券、智慧商圈、商家转账到零钱、公众号支付、微信小程序支付、分账、支付分、商家券、合单支付、先享卡、电商收付通等全部微信支付功能API,同时满足多个服务商、多个商户开发需求。一键集成,屏蔽了复杂度,API友好,上手快,欢迎star。
35+
Java微信支付V3支付Spring Boot
36+
Starter,支持微信优惠券,代金券、商家券、智慧商圈、商家转账到零钱、公众号支付、微信小程序支付、分账、支付分、商家券、合单支付、先享卡、电商收付通等全部微信支付功能API,同时满足多个服务商、多个商户开发需求。一键集成,屏蔽了复杂度,API友好,上手快,欢迎star。
3737

3838
## Maven 最新中央仓库坐标
3939

4040
```xml
41+
4142
<dependency>
4243
<groupId>cn.felord</groupId>
4344
<artifactId>payment-spring-boot-starter</artifactId>
4445
<version>1.0.17.RELEASE</version>
4546
</dependency>
4647
```
48+
4749
## JDK问题
4850

4951
**推荐使用Open JDK**,原因参见[FBI Warning](https://github.com/NotFound403/payment-spring-boot/issues/5)
5052

5153
## 文档地址
54+
5255
- [payment-spring-boot GitHub文档](https://notfound403.github.io/payment-spring-boot)
5356

5457
## 目前已经实现所有服务商和直连商户接口
@@ -65,39 +68,27 @@ Java微信支付V3支付Spring Boot Starter,支持微信优惠券,代金券
6568

6669
更新日志参考[changelog](https://notfound403.github.io/payment-spring-boot/#/changelog)
6770

68-
## 核心API结构
69-
![](https://asset.felord.cn/blog/20220613092244.png)
71+
## API清单
7072

71-
- `WechatPartnerProfitsharingApi` 微信支付服务商V3分账
72-
- `WechatBrandProfitsharingApi` 微信支付服务商V3连锁品牌分账
73-
- `WechatPayCallback` 微信支付V3回调通知工具封装
74-
- `WechatAllocationApi` 微信支付V2分账(未来会移除)
75-
- `WechatMarketingFavorApi` 微信支付代金券V3
76-
- `WechatCombinePayApi` 微信支付合单支付V3
77-
- `WechatPayScoreApi` 微信支付分V3
78-
- `WechatPayRedpackApi` 微信支付V2现金红包
79-
- `WechatDiscountCardApi` 微信支付V3先享卡
80-
- `WechatProfitsharingApi` 微信支付直连商户V3分账
81-
- `WechatPartnerPayApi` 微信支付服务商模式V3普通支付
82-
- `WechatMarketingBusiFavorApi` 微信支付V3商家券
83-
- `WechatPayTransfersApi` 微信支付V2企业付款到零钱,目前不包括到银行卡
84-
- `WechatDirectPayApi` 微信支付直连模式V3普通支付
85-
- `WechatPayScoreParkingApi` 微信支付分V3停车服务
86-
- `WechatBatchTransferApi` 微信支付V3批量转账到零钱
87-
- `WechatPartnerSpecialMchApi` 微信支付V3服务商商户进件
88-
- `WechatMediaApi` 微信支付V3媒体上传
89-
- `WechatEcommerceApi` 电商收付通
90-
- `WechatSmartGuideApi` 服务商或者直连商户-经营能力-支付即服务
91-
- `WechatGoldPlanApi` 服务商-经营能力-点金计划
73+
API结构如下:
74+
![](https://asset.felord.cn/blog/20220613092244.png)
75+
具体分为**直连商户****服务商**两个体系,请详细阅读文档说明
9276

9377
> 随着版本迭代功能会增加,可通过API注册表类`WechatPayV3Type`进行API接口检索。
9478
9579
## 使用入门
80+
9681
### 集成配置
97-
关于集成配置请详细阅读[payment-spring-boot GitHub文档](https://notfound403.github.io/payment-spring-boot)[快速接入](https://notfound403.github.io/payment-spring-boot/#/quick_start)章节
82+
83+
关于集成配置请详细阅读[payment-spring-boot GitHub文档](https://notfound403.github.io/payment-spring-boot)
84+
[快速接入](https://notfound403.github.io/payment-spring-boot/#/quick_start)章节
85+
9886
### 调用示例
87+
9988
#### 开启支付
89+
10090
需要手动通过`@EnableMobilePay`注解开启支付
91+
10192
```java
10293
import cn.felord.payment.autoconfigure.EnableMobilePay;
10394
import org.springframework.context.annotation.Configuration;
@@ -109,7 +100,9 @@ public class PayConfig {
109100
```
110101

111102
#### 支付接口调用
103+
112104
这里简单以小程序支付为例,写了一个Spring MVC 控制器,在实践中建议对`WechatApiProvider`进行二次封装作服务层调用
105+
113106
```java
114107
import cn.felord.payment.wechat.enumeration.TradeBillType;
115108
import cn.felord.payment.wechat.v3.WechatApiProvider;
@@ -135,6 +128,7 @@ public class PayController {
135128
@Autowired
136129
private WechatApiProvider wechatApiProvider;
137130
String TENANT_ID = "mobile";
131+
138132
/**
139133
* 总流程建议为 生成商品订单 -> 生成对应的支付订单 -> 支付操作 -> 支付结果回调更新 -> 结束
140134
* <p>
@@ -213,7 +207,9 @@ public class PayController {
213207
}
214208
}
215209
```
210+
216211
#### 回调示例
212+
217213
回调可通过以下示例实现,多租户的回调可将租户ID`tenantId`作为路径参数来实现
218214

219215
```java
@@ -248,7 +244,7 @@ import java.util.stream.Collectors;
248244
* @author felord.cn
249245
* @since 1.0.0.RELEASE
250246
*/
251-
@Profile({"wechat","dev"})
247+
@Profile({"wechat", "dev"})
252248
@RestController
253249
@RequestMapping("/wxpay/callbacks")
254250
public class CallbackController {
@@ -358,16 +354,17 @@ public class CallbackController {
358354
}
359355
```
360356

361-
362-
363357
## 开源协议
358+
364359
**Apache 2.0**
365360

366361
## 仓库地址
362+
367363
- [GitHub](https://github.com/NotFound403/payment-spring-boot)
368364
- [Gitee](https://gitee.com/felord/payment-spring-boot)
369365

370366
## QQ交流群
367+
371368
为了交流解惑,新建QQ群,可通过扫码进入。
372369

373370
![QQ交流群](./docs/img/qqun.png)

0 commit comments

Comments
 (0)