Skip to content

Commit edf558a

Browse files
authored
Merge pull request #14 from Wechat-Group/develop
更新
2 parents 9ac66af + db85c19 commit edf558a

File tree

61 files changed

+1785
-1355
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

61 files changed

+1785
-1355
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Weixin Java Tools —— 微信公众号&企业号开发 Java SDK
1+
WeixinJavaTools 微信支付、公众号&企业号开发Java SDK
22
=====================================
33
[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.binarywang/weixin-java-parent/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.github.binarywang/weixin-java-parent)
44
[![Build Status](https://travis-ci.org/Wechat-Group/weixin-java-tools.svg?branch=develop)](https://travis-ci.org/Wechat-Group/weixin-java-tools)
@@ -48,7 +48,7 @@ Weixin Java Tools —— 微信公众号&企业号开发 Java SDK
4848

4949
## Maven & Gradle 最新正式版本
5050

51-
* 公众号(订阅号、服务号):
51+
* 公众号(订阅号、服务号及微信支付):
5252

5353
maven:
5454
```xml

pom.xml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
<modelVersion>4.0.0</modelVersion>
66
<groupId>com.github.binarywang</groupId>
77
<artifactId>weixin-java-parent</artifactId>
8-
<version>2.6.0-SNAPSHOT</version>
8+
<version>2.5.2.BETA</version>
99
<packaging>pom</packaging>
1010
<name>WeiXin Java Tools - Parent</name>
1111
<description>微信公众号、企业号上级POM</description>
@@ -86,7 +86,8 @@
8686
<module>weixin-java-common</module>
8787
<module>weixin-java-cp</module>
8888
<module>weixin-java-mp</module>
89-
<module>weixin-java-osgi</module>
89+
<module>weixin-java-pay</module>
90+
<!--module>weixin-java-osgi</module-->
9091
</modules>
9192

9293
<properties>

weixin-java-common/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>com.github.binarywang</groupId>
88
<artifactId>weixin-java-parent</artifactId>
9-
<version>2.6.0-SNAPSHOT</version>
9+
<version>2.5.2.BETA</version>
1010
</parent>
1111

1212
<artifactId>weixin-java-common</artifactId>

weixin-java-common/src/main/java/me/chanjar/weixin/common/api/WxConsts.java

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,7 @@ public class WxConsts {
101101
public static final String EVT_KF_CLOSE_SESSION = "kf_close_session"; // 客服关闭会话
102102
public static final String EVT_KF_SWITCH_SESSION = "kf_switch_session"; // 客服转接会话
103103
public static final String EVT_POI_CHECK_NOTIFY = "poi_check_notify"; //门店审核事件推送
104+
public static final String EVN_SUBMIT_MEMBERCARD_USER_INFO = "submit_membercard_user_info"; //接收会员信息事件推送
104105
//以下为微信认证事件
105106
/**
106107
* 资质认证成功
@@ -135,13 +136,6 @@ public class WxConsts {
135136
public static final String MEDIA_VIDEO = "video";
136137
public static final String MEDIA_THUMB = "thumb";
137138
public static final String MEDIA_FILE = "file";
138-
///////////////////////
139-
// 文件类型
140-
///////////////////////
141-
public static final String FILE_JPG = "jpeg";
142-
public static final String FILE_MP3 = "mp3";
143-
public static final String FILE_AMR = "amr";
144-
public static final String FILE_MP4 = "mp4";
145139
/**
146140
* 点击推事件
147141
*/

weixin-java-cp/pom.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>com.github.binarywang</groupId>
88
<artifactId>weixin-java-parent</artifactId>
9-
<version>2.6.0-SNAPSHOT</version>
9+
<version>2.5.2.BETA</version>
1010
</parent>
1111

1212
<artifactId>weixin-java-cp</artifactId>
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
package me.chanjar.weixin.cp.api;
2+
3+
/**
4+
* <pre>
5+
* 仅供测试使用的一些常量
6+
* Created by Binary Wang on 2017-3-9.
7+
* </pre>
8+
*/
9+
public class TestConstants {
10+
///////////////////////
11+
// 文件类型
12+
///////////////////////
13+
public static final String FILE_JPG = "jpeg";
14+
public static final String FILE_MP3 = "mp3";
15+
public static final String FILE_AMR = "amr";
16+
public static final String FILE_MP4 = "mp4";
17+
}

weixin-java-cp/src/test/java/me/chanjar/weixin/cp/api/WxCpMediaAPITest.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,10 +54,10 @@ public void testUploadMedia(String mediaType, String fileType, String fileName)
5454
@DataProvider
5555
public Object[][] uploadMedia() {
5656
return new Object[][]{
57-
new Object[]{WxConsts.MEDIA_IMAGE, WxConsts.FILE_JPG, "mm.jpeg"},
58-
new Object[]{WxConsts.MEDIA_VOICE, WxConsts.FILE_MP3, "mm.mp3"},
59-
new Object[]{WxConsts.MEDIA_VIDEO, WxConsts.FILE_MP4, "mm.mp4"},
60-
new Object[]{WxConsts.MEDIA_FILE, WxConsts.FILE_JPG, "mm.jpeg"}
57+
new Object[]{WxConsts.MEDIA_IMAGE, TestConstants.FILE_JPG, "mm.jpeg"},
58+
new Object[]{WxConsts.MEDIA_VOICE, TestConstants.FILE_MP3, "mm.mp3"},
59+
new Object[]{WxConsts.MEDIA_VIDEO, TestConstants.FILE_MP4, "mm.mp4"},
60+
new Object[]{WxConsts.MEDIA_FILE, TestConstants.FILE_JPG, "mm.jpeg"}
6161
};
6262
}
6363

weixin-java-mp/pom.xml

Lines changed: 1 addition & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
<parent>
77
<groupId>com.github.binarywang</groupId>
88
<artifactId>weixin-java-parent</artifactId>
9-
<version>2.6.0-SNAPSHOT</version>
9+
<version>2.5.2.BETA</version>
1010
</parent>
1111
<artifactId>weixin-java-mp</artifactId>
1212
<name>WeiXin Java Tools - MP</name>
@@ -18,21 +18,11 @@
1818
<artifactId>weixin-java-common</artifactId>
1919
<version>${project.version}</version>
2020
</dependency>
21-
<dependency>
22-
<groupId>junit</groupId>
23-
<artifactId>junit</artifactId>
24-
<scope>test</scope>
25-
</dependency>
2621
<dependency>
2722
<groupId>org.testng</groupId>
2823
<artifactId>testng</artifactId>
2924
<scope>test</scope>
3025
</dependency>
31-
<dependency>
32-
<groupId>org.mockito</groupId>
33-
<artifactId>mockito-all</artifactId>
34-
<scope>test</scope>
35-
</dependency>
3626
<dependency>
3727
<groupId>com.google.inject</groupId>
3828
<artifactId>guice</artifactId>
@@ -54,16 +44,6 @@
5444
<version>2.9.4</version>
5545
<scope>test</scope>
5646
</dependency>
57-
<dependency>
58-
<groupId>io.rest-assured</groupId>
59-
<artifactId>xml-path</artifactId>
60-
<version>3.0.1</version>
61-
</dependency>
62-
<dependency>
63-
<groupId>com.github.binarywang</groupId>
64-
<artifactId>qrcode-utils</artifactId>
65-
<version>1.0</version>
66-
</dependency>
6747
</dependencies>
6848

6949
<build>

weixin-java-mp/src/main/java/me/chanjar/weixin/mp/api/WxMpConfigStorage.java

Lines changed: 0 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
import me.chanjar.weixin.common.bean.WxAccessToken;
44
import me.chanjar.weixin.common.util.http.ApacheHttpClientBuilder;
55

6-
import javax.net.ssl.SSLContext;
76
import java.io.File;
87
import java.util.concurrent.locks.Lock;
98

@@ -82,27 +81,6 @@ public interface WxMpConfigStorage {
8281

8382
String getSecret();
8483

85-
String getPartnerId();
86-
87-
String getPartnerKey();
88-
89-
/**
90-
* 微信支付异步回掉地址,通知url必须为直接可访问的url,不能携带参数。
91-
*
92-
* @since 2.5.0
93-
*/
94-
String getNotifyURL();
95-
96-
/**
97-
* 交易类型
98-
* <pre>
99-
* JSAPI--公众号支付、NATIVE--原生扫码支付、APP--app支付
100-
* </pre>
101-
*
102-
* @since 2.5.0
103-
*/
104-
String getTradeType();
105-
10684
String getToken();
10785

10886
String getAesKey();
@@ -121,17 +99,6 @@ public interface WxMpConfigStorage {
12199

122100
File getTmpDirFile();
123101

124-
SSLContext getSslContext();
125-
126-
void setSslContext(SSLContext sslContext);
127-
128-
/**
129-
* 在此之前,必须将partnerId进行赋值
130-
*
131-
* @param filePath apiclient_cert.p12的文件的绝对路径
132-
*/
133-
void setSslContextFilePath(String filePath) throws Exception;
134-
135102
/**
136103
* http client builder
137104
*
@@ -144,8 +111,4 @@ public interface WxMpConfigStorage {
144111
*/
145112
boolean autoRefreshToken();
146113

147-
/**
148-
* 微信支付是否使用仿真测试环境
149-
*/
150-
boolean useSandboxForWxPay();
151114
}

0 commit comments

Comments
 (0)