Skip to content

Commit

Permalink
Merge pull request #86 from NotFound403/1.0.15
Browse files Browse the repository at this point in the history
1.0.15
  • Loading branch information
NotFound403 authored Jan 3, 2023
2 parents 2f391cc + 379d007 commit 4dea6b0
Show file tree
Hide file tree
Showing 30 changed files with 715 additions and 96 deletions.
26 changes: 14 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[![Maven Central Repo Deployment](https://github.com/NotFound403/payment-spring-boot/actions/workflows/main.yml/badge.svg)](https://github.com/NotFound403/payment-spring-boot/actions/workflows/main.yml)

# 最好用的微信支付V3 Spring Boot 组件
# 最好用的微信支付V3 Spring Boot 组件

为了满足业务中出现app支付、公众号支付、小程序支付等多appid并存的场景,对原有的进行了增强开发出了多租户版本。

Expand All @@ -13,13 +13,18 @@
<dependency>
<groupId>cn.felord</groupId>
<artifactId>payment-spring-boot-starter</artifactId>
<version>1.0.14.RELEASE</version>
<version>1.0.15.RELEASE</version>
</dependency>
```
## JDK问题

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

## 文档地址
- [payment-spring-boot GitHub文档](https://notfound403.github.io/payment-spring-boot)
- [payment-spring-boot Gitee文档](https://felord.gitee.io/payment-spring-boot)


## 目前已经实现所有服务商和直连商户接口

- 实现微信支付多商户
Expand All @@ -32,12 +37,13 @@
- 实现微信支付V3 商家券
- 实现微信支付V3 批量转账到零钱

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

## 核心API结构
![](https://asset.felord.cn/blog/20220613092244.png)

- `WechatPartnerProfitsharingApi` 微信支付服务商V3分账
- `WechatBrandProfitsharingApi` 微信支付服务商V3连锁品牌分账
- `WechatPayCallback` 微信支付V3回调通知工具封装
- `WechatAllocationApi` 微信支付V2分账(未来会移除)
- `WechatMarketingFavorApi` 微信支付代金券V3
Expand All @@ -51,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` 服务商-经营能力-点金计划

> 随着版本迭代功能会增加。
Expand All @@ -67,10 +73,6 @@
- [GitHub](https://github.com/NotFound403/payment-spring-boot)
- [Gitee](https://gitee.com/felord/payment-spring-boot)

## 文档地址
- [payment-spring-boot GitHub文档](https://notfound403.github.io/payment-spring-boot)
- [payment-spring-boot Gitee文档](https://felord.gitee.io/payment-spring-boot)

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

Expand Down
2 changes: 1 addition & 1 deletion docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
<dependency>
<groupId>cn.felord</groupId>
<artifactId>payment-spring-boot-starter</artifactId>
<version>1.0.14.RELEASE</version>
<version>1.0.15.RELEASE</version>
</dependency>
```
## 采用技术
Expand Down
15 changes: 13 additions & 2 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,26 @@
## 1.0.15.RELEASE
### 微信支付
- feat: 增加服务商退款API
- feat: 微信服务商分账-连锁品牌分账 [#82](https://github.com/NotFound403/payment-spring-boot/issues/82)
- fix: 多租户证书无法复用的问题,刷新时正确移除证书 [#77](https://github.com/NotFound403/payment-spring-boot/issues/77)
- fix: 批量转账到零钱API入参NPE问题修复 [#85](https://github.com/NotFound403/payment-spring-boot/issues/85)
- fix: 商家券-修改批次预算API请求方法应该为Patch [#79](https://github.com/NotFound403/payment-spring-boot/issues/79)
- enhance: 部分时间格式优化,更好地兼容Java Time API
- enhance: 微信代金券样式的背景颜色枚举更新 [#84](https://github.com/NotFound403/payment-spring-boot/issues/84)
- upgrade: Spring Boot 版本升级到2.7.7

## 1.0.14.RELEASE
### 微信支付
- fix: 批量转账到零钱查询BUG [#I5E2X7](https://gitee.com/felord/payment-spring-boot/issues/I5E2X7)
- feat: 移除了被标记过期的API,包括基于微信支付V2版本的分账实现,使用相关接口的同学需要针对性的进行迁移
- feat: 增加证书绝对路径实现
- 配置项增加`certAbsolutePath`字段用来定义证书的绝对路径,优先级高于`certPath`,当这两个路径都不配置时采用classpath路径`wechat/apiclient_cert.p12`
- 配置项增加`certAbsolutePath`字段用来定义证书的绝对路径,优先级高于`certPath`,当这两个路径都不配置时采用classpath路径`wechat/apiclient_cert.p12` [#73](https://github.com/NotFound403/payment-spring-boot/issues/73)
#### 服务商
- feat: 实现服务商商户进件-特约商户进件相关API
- feat: 实现点金计划,适用于服务商
- feat: 实现行业方案-电商收付通
- feat: 实现行业方案-智慧商圈
feat: 实现其它能力-银行组件(服务商)
- feat: 实现其它能力-银行组件(服务商)
- enhance: 服务商分账新增下载账单接口
- enhance: 新增服务商退款回调接口
#### 通用能力
Expand Down
2 changes: 1 addition & 1 deletion docs/quick_start.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<dependency>
<groupId>cn.felord</groupId>
<artifactId>payment-spring-boot-starter</artifactId>
<version>1.0.14.RELEASE</version>
<version>1.0.15.RELEASE</version>
</dependency>
```
> 基于 **Spring Boot 2.x**
Expand Down
4 changes: 2 additions & 2 deletions payment-spring-boot-autoconfigure/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
<parent>
<groupId>cn.felord</groupId>
<artifactId>payment-spring-boot</artifactId>
<version>1.0.14.RELEASE</version>
<version>1.0.15.RELEASE</version>
</parent>

<artifactId>payment-spring-boot-autoconfigure</artifactId>
<version>1.0.14.RELEASE</version>
<version>1.0.15.RELEASE</version>
<packaging>jar</packaging>
<modelVersion>4.0.0</modelVersion>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
/**
* 超级管理员类型
*
* @since
* @since 1.0.14.RELEASE
*/
public enum ContactType {
/**
Expand All @@ -31,7 +31,7 @@ public enum ContactType {
LEGAL,
/**
* 经办人
*
* <p>
* 经商户授权办理微信支付业务的人员
*/
SUPER
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,42 +29,41 @@ public enum CouponBgColor {
/**
* Color 010 coupon bg color.
*/
Color010,
COLOR010,
/**
* Color 020 coupon bg color.
* COLOR 020 coupon bg color.
*/
Color020,
COLOR020,
/**
* Color 030 coupon bg color.
* COLOR 030 coupon bg color.
*/
Color030,
COLOR030,
/**
* Color 040 coupon bg color.
* COLOR 040 coupon bg color.
*/
Color040,
COLOR040,
/**
* Color 050 coupon bg color.
* COLOR 050 coupon bg color.
*/
Color050,
COLOR050,
/**
* Color 060 coupon bg color.
* COLOR 060 coupon bg color.
*/
Color060,
COLOR060,
/**
* Color 070 coupon bg color.
* COLOR 070 coupon bg color.
*/
Color070,
COLOR070,
/**
* Color 080 coupon bg color.
* COLOR 080 coupon bg color.
*/
Color080,
COLOR080,
/**
* Color 090 coupon bg color.
* COLOR 090 coupon bg color.
*/
Color090,
COLOR090,
/**
* Color 100 coupon bg color.
* COLOR 100 coupon bg color.
*/
Color100

COLOR100
}
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ public enum SubjectType {
* 营业执照上的主体类型一般为个体户、个体工商户、个体经营;
*/
SUBJECT_TYPE_INDIVIDUAL,
/**
* 小微商户
*/
SUBJECT_TYPE_MICRO,
/**
* 企业
* <p>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -460,11 +460,11 @@ public enum WechatPayV3Type {
*/
MARKETING_BUSI_FAVOR_DISASSOCIATE(HttpMethod.POST, "%s/v3/marketing/busifavor/coupons/disassociate"),
/**
* 取消关联订单信息API.
* 修改批次预算API.
*
* @since 1.0.4.RELEASES
*/
MARKETING_BUSI_FAVOR_BUDGET(HttpMethod.POST, "%s/v3/marketing/busifavor/stocks/{stock_id}/budget"),
MARKETING_BUSI_FAVOR_BUDGET(HttpMethod.PATCH, "%s/v3/marketing/busifavor/stocks/{stock_id}/budget"),
/**
* 修改商家券基本信息API.
*
Expand Down Expand Up @@ -680,6 +680,62 @@ public enum WechatPayV3Type {
* @since 1.0.13.RELEASE
*/
PROFITSHARING_BILLS(HttpMethod.GET, "%s/v3/profitsharing/bills"),

//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/**
* 请求品牌分账API.
*
* @since 1.0.15.RELEASE
*/
BRAND_PROFITSHARING_ORDERS(HttpMethod.POST, "%s/v3/brand/profitsharing/orders"),
/**
* 查询品牌分账结果API.
*
* @since 1.0.15.RELEASE
*/
BRAND_PROFITSHARING_RESULT(HttpMethod.GET, "%s/v3/brand/profitsharing/orders"),
/**
* 请求品牌分账回退API.
*
* @since 1.0.15.RELEASE
*/
BRAND_PROFITSHARING_RETURN_ORDERS(HttpMethod.POST, "%s/v3/brand/profitsharing/returnorders"),
/**
* 查询品牌分账回退结果API.
*
* @since 1.0.15.RELEASE
*/
BRAND_PROFITSHARING_RETURN_ORDERS_RESULT(HttpMethod.GET, "%s/v3/brand/profitsharing/returnorders"),
/**
* 完结品牌分账API.
*
* @since 1.0.15.RELEASE
*/
BRAND_PROFITSHARING_FINISH_ORDER(HttpMethod.POST, "%s/v3/brand/profitsharing/finish-order"),
/**
* 查询订单剩余待分金额API.
*
* @since 1.0.15.RELEASE
*/
BRAND_PROFITSHARING_ORDER_AMOUNTS(HttpMethod.GET, "%s/v3/brand/profitsharing/orders/{transaction_id}/amounts"),
/**
* 查询最大分账比例API.
*
* @since 1.0.15.RELEASE
*/
BRAND_CONFIGS(HttpMethod.GET, "%s/v3/brand/profitsharing/brand-configs/{brand_mchid}"),
/**
* 添加品牌分账接收方API.
*
* @since 1.0.15.RELEASE
*/
BRAND_PROFITSHARING_RECEIVERS_ADD(HttpMethod.POST, "%s/v3/brand/profitsharing/receivers/add"),
/**
* 删除分账接收方API.
*
* @since 1.0.15.RELEASE
*/
BRAND_PROFITSHARING_RECEIVERS_DELETE(HttpMethod.POST, "%s/v3/brand/profitsharing/receivers/delete"),
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/**
* 服务商-商户进件-特约商户进件-提交申请单API.
Expand Down Expand Up @@ -830,7 +886,7 @@ public enum WechatPayV3Type {
*/
ECOMMERCE_PROFITSHARING_RECEIVERS_ADD(HttpMethod.POST, "%s/v3/ecommerce/profitsharing/receivers/add"),
/**
* 行业方案-电商收付通-分账-添加分账接收方API.
* 行业方案-电商收付通-分账-删除分账接收方API.
*
* @since 1.0.14.RELEASE
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,8 +94,7 @@ public AbstractApi(WechatPayClient wechatPayClient, String tenantId) {
* @param mapper the mapper
*/
private void applyObjectMapper(ObjectMapper mapper) {
mapper.setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE
)
mapper.setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE)
.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false)
// empty string error
.configure(DeserializationFeature.ACCEPT_EMPTY_STRING_AS_NULL_OBJECT, true)
Expand Down
Loading

0 comments on commit 4dea6b0

Please sign in to comment.