mirror of
https://github.com/dromara/payment-spring-boot.git
synced 2026-03-14 05:43:46 +08:00
Compare commits
8 Commits
1.0.8.RELE
...
1.0.9.RELE
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
54a0822c73 | ||
|
|
8d130e5df1 | ||
|
|
e0eacd523e | ||
|
|
d1068c1fb6 | ||
|
|
82bcc11dad | ||
|
|
911f986d80 | ||
|
|
b913698884 | ||
|
|
34e5443e88 |
33
.github/workflows/main.yml
vendored
Normal file
33
.github/workflows/main.yml
vendored
Normal file
@@ -0,0 +1,33 @@
|
|||||||
|
name: Maven Central Repo Deployment
|
||||||
|
# 当 release 的时候触发
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [released]
|
||||||
|
jobs:
|
||||||
|
publish:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Set up Maven Central Repo
|
||||||
|
uses: actions/setup-java@v1
|
||||||
|
with:
|
||||||
|
java-version: 1.8
|
||||||
|
server-id: sonatype-nexus-staging
|
||||||
|
server-username: MAVEN_USERNAME
|
||||||
|
server-password: MAVEN_PASSWORD
|
||||||
|
- id: install-secret-key
|
||||||
|
name: Install GPG Secret Key
|
||||||
|
run: |
|
||||||
|
cat <(echo -e "${{ secrets.GPG_PUB }}") | gpg --batch --import
|
||||||
|
gpg --list-secret-keys --keyid-format LONG
|
||||||
|
- id: publish-to-central
|
||||||
|
name: Publish to Maven Central Repo
|
||||||
|
env:
|
||||||
|
MAVEN_USERNAME: ${{ secrets.OSSRH_USER }}
|
||||||
|
MAVEN_PASSWORD: ${{ secrets.OSSRH_PASSWORD }}
|
||||||
|
run: |
|
||||||
|
mvn \
|
||||||
|
--no-transfer-progress \
|
||||||
|
--batch-mode \
|
||||||
|
-Dgpg.passphrase=${{ secrets.GPG_PASSWORD }} \
|
||||||
|
clean deploy
|
||||||
@@ -11,7 +11,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cn.felord</groupId>
|
<groupId>cn.felord</groupId>
|
||||||
<artifactId>payment-spring-boot-starter</artifactId>
|
<artifactId>payment-spring-boot-starter</artifactId>
|
||||||
<version>1.0.8.RELEASE</version>
|
<version>1.0.9.RELEASE</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cn.felord</groupId>
|
<groupId>cn.felord</groupId>
|
||||||
<artifactId>payment-spring-boot-starter</artifactId>
|
<artifactId>payment-spring-boot-starter</artifactId>
|
||||||
<version>1.0.8.RELEASE</version>
|
<version>1.0.9.RELEASE</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
```
|
```
|
||||||
## 采用技术
|
## 采用技术
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<dependency>
|
<dependency>
|
||||||
<groupId>cn.felord</groupId>
|
<groupId>cn.felord</groupId>
|
||||||
<artifactId>payment-spring-boot-starter</artifactId>
|
<artifactId>payment-spring-boot-starter</artifactId>
|
||||||
<version>1.0.8.RELEASE</version>
|
<version>1.0.9.RELEASE</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
```
|
```
|
||||||
> 基于 **Spring Boot 2.x**
|
> 基于 **Spring Boot 2.x**
|
||||||
|
|||||||
@@ -5,11 +5,11 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>cn.felord</groupId>
|
<groupId>cn.felord</groupId>
|
||||||
<artifactId>payment-spring-boot</artifactId>
|
<artifactId>payment-spring-boot</artifactId>
|
||||||
<version>1.0.8.RELEASE</version>
|
<version>1.0.9.RELEASE</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>payment-spring-boot-autoconfigure</artifactId>
|
<artifactId>payment-spring-boot-autoconfigure</artifactId>
|
||||||
<version>1.0.8.RELEASE</version>
|
<version>1.0.9.RELEASE</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
@@ -65,6 +65,18 @@ public class WechatApiProvider {
|
|||||||
return new WechatDirectPayApi(wechatPayClient, tenantId);
|
return new WechatDirectPayApi(wechatPayClient, tenantId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 普通支付-服务商模式.
|
||||||
|
*
|
||||||
|
* @param tenantId the tenant id
|
||||||
|
* @return the wechat pay api
|
||||||
|
* @since 1.0.9.RELEASE
|
||||||
|
*/
|
||||||
|
public WechatPartnerPayApi partnerPayApi(String tenantId) {
|
||||||
|
return new WechatPartnerPayApi(wechatPayClient, tenantId);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 合单支付.
|
* 合单支付.
|
||||||
*
|
*
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ import org.springframework.util.StringUtils;
|
|||||||
import org.springframework.web.util.UriComponentsBuilder;
|
import org.springframework.web.util.UriComponentsBuilder;
|
||||||
|
|
||||||
import java.net.URI;
|
import java.net.URI;
|
||||||
|
import java.util.Optional;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 微信支付商家券.
|
* 微信支付商家券.
|
||||||
@@ -146,7 +147,10 @@ public class WechatMarketingBusiFavorApi extends AbstractApi {
|
|||||||
queryParams.add("appid", appid);
|
queryParams.add("appid", appid);
|
||||||
}
|
}
|
||||||
queryParams.add("stock_id", userBusiFavorQueryParams.getStockId());
|
queryParams.add("stock_id", userBusiFavorQueryParams.getStockId());
|
||||||
queryParams.add("coupon_state", userBusiFavorQueryParams.getCouponState().name());
|
|
||||||
|
Optional.ofNullable(userBusiFavorQueryParams.getCouponState())
|
||||||
|
.ifPresent(state-> queryParams.add("coupon_state", state.name()));
|
||||||
|
|
||||||
queryParams.add("creator_merchant", userBusiFavorQueryParams.getCreatorMerchant());
|
queryParams.add("creator_merchant", userBusiFavorQueryParams.getCreatorMerchant());
|
||||||
queryParams.add("belong_merchant", userBusiFavorQueryParams.getBelongMerchant());
|
queryParams.add("belong_merchant", userBusiFavorQueryParams.getBelongMerchant());
|
||||||
queryParams.add("sender_merchant", userBusiFavorQueryParams.getSenderMerchant());
|
queryParams.add("sender_merchant", userBusiFavorQueryParams.getSenderMerchant());
|
||||||
|
|||||||
@@ -31,6 +31,7 @@ import cn.felord.payment.wechat.v3.model.payscore.PayScoreUserPaidConsumeData;
|
|||||||
import cn.felord.payment.wechat.v3.model.payscore.PayScoreUserPermissionConsumeData;
|
import cn.felord.payment.wechat.v3.model.payscore.PayScoreUserPermissionConsumeData;
|
||||||
import com.fasterxml.jackson.annotation.JsonInclude;
|
import com.fasterxml.jackson.annotation.JsonInclude;
|
||||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
|
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
|
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
|
||||||
import com.fasterxml.jackson.databind.module.SimpleModule;
|
import com.fasterxml.jackson.databind.module.SimpleModule;
|
||||||
@@ -73,6 +74,7 @@ public class WechatPayCallback {
|
|||||||
static {
|
static {
|
||||||
MAPPER.setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE);
|
MAPPER.setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE);
|
||||||
MAPPER.setSerializationInclusion(JsonInclude.Include.NON_NULL);
|
MAPPER.setSerializationInclusion(JsonInclude.Include.NON_NULL);
|
||||||
|
MAPPER.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES,false);
|
||||||
SimpleModule module = new JavaTimeModule();
|
SimpleModule module = new JavaTimeModule();
|
||||||
MAPPER.registerModule(module);
|
MAPPER.registerModule(module);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -49,7 +49,7 @@ public class BusiFavorReceiveConsumeData {
|
|||||||
/**
|
/**
|
||||||
* 发放时间 rfc 3339 yyyy-MM-ddTHH:mm:ss+TIMEZONE
|
* 发放时间 rfc 3339 yyyy-MM-ddTHH:mm:ss+TIMEZONE
|
||||||
*/
|
*/
|
||||||
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ssXXX", timezone = "GMT+8")
|
@JsonFormat(pattern = "yyyy-MM-dd'T'HH:mm:ss", timezone = "GMT+8")
|
||||||
private OffsetDateTime sendTime;
|
private OffsetDateTime sendTime;
|
||||||
/**
|
/**
|
||||||
* 微信用户在appid下的唯一标识。
|
* 微信用户在appid下的唯一标识。
|
||||||
|
|||||||
@@ -98,6 +98,10 @@ public class PayScoreUserPaidConsumeData {
|
|||||||
* The Time range.
|
* The Time range.
|
||||||
*/
|
*/
|
||||||
private TimeRange timeRange;
|
private TimeRange timeRange;
|
||||||
|
/**
|
||||||
|
* stateDescription
|
||||||
|
*/
|
||||||
|
private String stateDescription;
|
||||||
/**
|
/**
|
||||||
* The Total amount.
|
* The Total amount.
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -5,11 +5,11 @@
|
|||||||
<parent>
|
<parent>
|
||||||
<groupId>cn.felord</groupId>
|
<groupId>cn.felord</groupId>
|
||||||
<artifactId>payment-spring-boot</artifactId>
|
<artifactId>payment-spring-boot</artifactId>
|
||||||
<version>1.0.8.RELEASE</version>
|
<version>1.0.9.RELEASE</version>
|
||||||
</parent>
|
</parent>
|
||||||
|
|
||||||
<artifactId>payment-spring-boot-starter</artifactId>
|
<artifactId>payment-spring-boot-starter</artifactId>
|
||||||
<version>1.0.8.RELEASE</version>
|
<version>1.0.9.RELEASE</version>
|
||||||
<packaging>jar</packaging>
|
<packaging>jar</packaging>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
|
|||||||
4
pom.xml
4
pom.xml
@@ -4,7 +4,7 @@
|
|||||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||||
<groupId>cn.felord</groupId>
|
<groupId>cn.felord</groupId>
|
||||||
<artifactId>payment-spring-boot</artifactId>
|
<artifactId>payment-spring-boot</artifactId>
|
||||||
<version>1.0.8.RELEASE</version>
|
<version>1.0.9.RELEASE</version>
|
||||||
<packaging>pom</packaging>
|
<packaging>pom</packaging>
|
||||||
<modelVersion>4.0.0</modelVersion>
|
<modelVersion>4.0.0</modelVersion>
|
||||||
|
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
</developers>
|
</developers>
|
||||||
|
|
||||||
<scm>
|
<scm>
|
||||||
<tag>payment-spring-boot-1.0.8.RELEASE</tag>
|
<tag>payment-spring-boot-1.0.9.RELEASE</tag>
|
||||||
<url>https://github.com/NotFound403/payment-spring-boot</url>
|
<url>https://github.com/NotFound403/payment-spring-boot</url>
|
||||||
<connection>scm:git:https://github.com/NotFound403/payment-spring-boot.git</connection>
|
<connection>scm:git:https://github.com/NotFound403/payment-spring-boot.git</connection>
|
||||||
<developerConnection>scm:git:https://github.com/NotFound403/payment-spring-boot.git</developerConnection>
|
<developerConnection>scm:git:https://github.com/NotFound403/payment-spring-boot.git</developerConnection>
|
||||||
|
|||||||
Reference in New Issue
Block a user