mirror of
https://github.com/dromara/payment-spring-boot.git
synced 2026-03-13 21:33:41 +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>
|
||||
<groupId>cn.felord</groupId>
|
||||
<artifactId>payment-spring-boot-starter</artifactId>
|
||||
<version>1.0.8.RELEASE</version>
|
||||
<version>1.0.9.RELEASE</version>
|
||||
</dependency>
|
||||
```
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
<dependency>
|
||||
<groupId>cn.felord</groupId>
|
||||
<artifactId>payment-spring-boot-starter</artifactId>
|
||||
<version>1.0.8.RELEASE</version>
|
||||
<version>1.0.9.RELEASE</version>
|
||||
</dependency>
|
||||
```
|
||||
## 采用技术
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<dependency>
|
||||
<groupId>cn.felord</groupId>
|
||||
<artifactId>payment-spring-boot-starter</artifactId>
|
||||
<version>1.0.8.RELEASE</version>
|
||||
<version>1.0.9.RELEASE</version>
|
||||
</dependency>
|
||||
```
|
||||
> 基于 **Spring Boot 2.x**
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
<parent>
|
||||
<groupId>cn.felord</groupId>
|
||||
<artifactId>payment-spring-boot</artifactId>
|
||||
<version>1.0.8.RELEASE</version>
|
||||
<version>1.0.9.RELEASE</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>payment-spring-boot-autoconfigure</artifactId>
|
||||
<version>1.0.8.RELEASE</version>
|
||||
<version>1.0.9.RELEASE</version>
|
||||
<packaging>jar</packaging>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
|
||||
@@ -65,6 +65,18 @@ public class WechatApiProvider {
|
||||
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 java.net.URI;
|
||||
import java.util.Optional;
|
||||
|
||||
/**
|
||||
* 微信支付商家券.
|
||||
@@ -146,7 +147,10 @@ public class WechatMarketingBusiFavorApi extends AbstractApi {
|
||||
queryParams.add("appid", appid);
|
||||
}
|
||||
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("belong_merchant", userBusiFavorQueryParams.getBelongMerchant());
|
||||
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 com.fasterxml.jackson.annotation.JsonInclude;
|
||||
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||
import com.fasterxml.jackson.databind.DeserializationFeature;
|
||||
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||
import com.fasterxml.jackson.databind.PropertyNamingStrategy;
|
||||
import com.fasterxml.jackson.databind.module.SimpleModule;
|
||||
@@ -73,6 +74,7 @@ public class WechatPayCallback {
|
||||
static {
|
||||
MAPPER.setPropertyNamingStrategy(PropertyNamingStrategy.SNAKE_CASE);
|
||||
MAPPER.setSerializationInclusion(JsonInclude.Include.NON_NULL);
|
||||
MAPPER.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES,false);
|
||||
SimpleModule module = new JavaTimeModule();
|
||||
MAPPER.registerModule(module);
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ public class BusiFavorReceiveConsumeData {
|
||||
/**
|
||||
* 发放时间 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;
|
||||
/**
|
||||
* 微信用户在appid下的唯一标识。
|
||||
|
||||
@@ -98,6 +98,10 @@ public class PayScoreUserPaidConsumeData {
|
||||
* The Time range.
|
||||
*/
|
||||
private TimeRange timeRange;
|
||||
/**
|
||||
* stateDescription
|
||||
*/
|
||||
private String stateDescription;
|
||||
/**
|
||||
* The Total amount.
|
||||
*/
|
||||
|
||||
@@ -5,11 +5,11 @@
|
||||
<parent>
|
||||
<groupId>cn.felord</groupId>
|
||||
<artifactId>payment-spring-boot</artifactId>
|
||||
<version>1.0.8.RELEASE</version>
|
||||
<version>1.0.9.RELEASE</version>
|
||||
</parent>
|
||||
|
||||
<artifactId>payment-spring-boot-starter</artifactId>
|
||||
<version>1.0.8.RELEASE</version>
|
||||
<version>1.0.9.RELEASE</version>
|
||||
<packaging>jar</packaging>
|
||||
<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">
|
||||
<groupId>cn.felord</groupId>
|
||||
<artifactId>payment-spring-boot</artifactId>
|
||||
<version>1.0.8.RELEASE</version>
|
||||
<version>1.0.9.RELEASE</version>
|
||||
<packaging>pom</packaging>
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
</developers>
|
||||
|
||||
<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>
|
||||
<connection>scm:git:https://github.com/NotFound403/payment-spring-boot.git</connection>
|
||||
<developerConnection>scm:git:https://github.com/NotFound403/payment-spring-boot.git</developerConnection>
|
||||
|
||||
Reference in New Issue
Block a user