upgrade to 1.7.9

This commit is contained in:
jinyu 2017-11-09 20:57:07 +08:00
parent 0f1960b55c
commit ad4129d303
14 changed files with 84 additions and 15 deletions

View File

@ -4,7 +4,7 @@
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
<groupId>com.foxinmy</groupId> <groupId>com.foxinmy</groupId>
<artifactId>weixin4j</artifactId> <artifactId>weixin4j</artifactId>
<version>1.7.8</version> <version>1.7.9</version>
<packaging>pom</packaging> <packaging>pom</packaging>
<name>weixin4j</name> <name>weixin4j</name>
<url>https://github.com/foxinmy/weixin4j</url> <url>https://github.com/foxinmy/weixin4j</url>

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>com.foxinmy</groupId> <groupId>com.foxinmy</groupId>
<artifactId>weixin4j</artifactId> <artifactId>weixin4j</artifactId>
<version>1.7.8</version> <version>1.7.9</version>
</parent> </parent>
<artifactId>weixin4j-base</artifactId> <artifactId>weixin4j-base</artifactId>
<name>weixin4j-base</name> <name>weixin4j-base</name>

View File

@ -864,5 +864,5 @@ public class WeixinPayProxy {
return customsApi.queryCustomsOrder(idQuery, customsCity); return customsApi.queryCustomsOrder(idQuery, customsCity);
} }
public final static String VERSION = "1.7.8"; public final static String VERSION = "1.7.9";
} }

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>com.foxinmy</groupId> <groupId>com.foxinmy</groupId>
<artifactId>weixin4j</artifactId> <artifactId>weixin4j</artifactId>
<version>1.7.8</version> <version>1.7.9</version>
</parent> </parent>
<packaging>war</packaging> <packaging>war</packaging>
<artifactId>weixin4j-example</artifactId> <artifactId>weixin4j-example</artifactId>
@ -48,19 +48,25 @@
<dependency> <dependency>
<groupId>com.foxinmy</groupId> <groupId>com.foxinmy</groupId>
<artifactId>weixin4j-mp</artifactId> <artifactId>weixin4j-mp</artifactId>
<version>1.7.8</version> <version>1.7.9</version>
</dependency> </dependency>
<!-- 微信企业号 --> <!-- 微信企业号 -->
<dependency> <dependency>
<groupId>com.foxinmy</groupId> <groupId>com.foxinmy</groupId>
<artifactId>weixin4j-qy</artifactId> <artifactId>weixin4j-qy</artifactId>
<version>1.7.8</version> <version>1.7.9</version>
</dependency> </dependency>
<!-- 微信被动消息(回调模式) --> <!-- 微信被动消息(回调模式) -->
<dependency> <dependency>
<groupId>com.foxinmy</groupId> <groupId>com.foxinmy</groupId>
<artifactId>weixin4j-server</artifactId> <artifactId>weixin4j-server</artifactId>
<version>1.1.8</version> <version>1.1.8</version>
<exclusions>
<exclusion>
<artifactId>netty-all</artifactId>
<groupId>io.netty</groupId>
</exclusion>
</exclusions>
</dependency> </dependency>
<dependency> <dependency>
<groupId>org.springframework</groupId> <groupId>org.springframework</groupId>
@ -89,5 +95,10 @@
<artifactId>standard</artifactId> <artifactId>standard</artifactId>
<version>1.1.2</version> <version>1.1.2</version>
</dependency> </dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>3.3.1</version>
</dependency>
</dependencies> </dependencies>
</project> </project>

View File

@ -0,0 +1,58 @@
import java.io.IOException;
import com.foxinmy.weixin4j.exception.WeixinException;
import com.foxinmy.weixin4j.model.WeixinPayAccount;
import com.foxinmy.weixin4j.payment.WeixinPayProxy;
import com.foxinmy.weixin4j.payment.mch.RefundResult;
import com.foxinmy.weixin4j.sign.WeixinPaymentSignature;
import com.foxinmy.weixin4j.sign.WeixinSignature;
import com.foxinmy.weixin4j.type.CurrencyType;
import com.foxinmy.weixin4j.type.IdQuery;
import com.foxinmy.weixin4j.type.IdType;
import com.foxinmy.weixin4j.type.mch.RefundAccountType;
/**
* 支付测试商户平台
*
* @className PayTest
* @author jinyu(foxinmy@gmail.com)
* @date 2016年1月30日
* @since JDK 1.7
* @see
*/
public class PayTest {
protected final static WeixinPayAccount ACCOUNT;
protected final static WeixinSignature SIGNATURE;
protected final static WeixinPayProxy PAY;
static {
ACCOUNT = new WeixinPayAccount(
"wx0d1d598c0c03c999",
"GATFzDwbQdbbci3QEQxX2rUBvwTrsMiZ",
"10020674",
"10020674",
"/Users/jy/workspace/feican/canyi-weixin-parent/canyi-weixin-service/src/main/resources/10020674.p12");
SIGNATURE = new WeixinPaymentSignature(ACCOUNT.getPaySignKey());
PAY = new WeixinPayProxy(ACCOUNT);
}
public static void refund() throws WeixinException, IOException {
IdQuery idQuery = new IdQuery("TT_1427183696238", IdType.TRADENO);
RefundResult result = PAY.applyRefund(idQuery,
"TT_R" + System.currentTimeMillis(), 0.01d, 0.01d,
CurrencyType.CNY, "10020674", "退款描述",
RefundAccountType.REFUND_SOURCE_RECHARGE_FUNDS);
System.err.println(result);
String sign = result.getSign();
result.setSign(null);
String valiSign = SIGNATURE.sign(result);
System.err
.println(String.format("sign=%s,valiSign=%s", sign, valiSign));
}
public static void main(String[] args) throws WeixinException, IOException{
refund();
}
}

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>com.foxinmy</groupId> <groupId>com.foxinmy</groupId>
<artifactId>weixin4j</artifactId> <artifactId>weixin4j</artifactId>
<version>1.7.8</version> <version>1.7.9</version>
</parent> </parent>
<artifactId>weixin4j-mp</artifactId> <artifactId>weixin4j-mp</artifactId>
<name>weixin4j-mp</name> <name>weixin4j-mp</name>

View File

@ -212,5 +212,5 @@ public class WeixinComponentProxy {
component(componentId).getTokenManager()); component(componentId).getTokenManager());
} }
public final static String VERSION = "1.7.8"; public final static String VERSION = "1.7.9";
} }

View File

@ -2202,5 +2202,5 @@ public class WeixinProxy {
return commentApi.deleteCommentReply(msgid, index, commentId); return commentApi.deleteCommentReply(msgid, index, commentId);
} }
public final static String VERSION = "1.7.8"; public final static String VERSION = "1.7.9";
} }

View File

@ -42,7 +42,7 @@ public class WeixinTokenComponentCreator extends TokenCreator {
@Override @Override
public String uniqueid() { public String uniqueid() {
return String.format("%s,%s", perTicketManager.getThirdId(), perTicketManager.getAuthAppId()); return String.format("%s_%s", perTicketManager.getThirdId(), perTicketManager.getAuthAppId());
} }
@Override @Override

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>com.foxinmy</groupId> <groupId>com.foxinmy</groupId>
<artifactId>weixin4j</artifactId> <artifactId>weixin4j</artifactId>
<version>1.7.8</version> <version>1.7.9</version>
</parent> </parent>
<artifactId>weixin4j-qy</artifactId> <artifactId>weixin4j-qy</artifactId>
<name>weixin4j-qy</name> <name>weixin4j-qy</name>

View File

@ -1376,5 +1376,5 @@ public class WeixinProxy {
return chatApi.sendChatMessage(message); return chatApi.sendChatMessage(message);
} }
public final static String VERSION = "1.7.8"; public final static String VERSION = "1.7.9";
} }

View File

@ -280,5 +280,5 @@ public class WeixinSuiteProxy {
suite(suiteId).getTokenManager()); suite(suiteId).getTokenManager());
} }
public final static String VERSION = "1.7.8"; public final static String VERSION = "1.7.9";
} }

View File

@ -5,7 +5,7 @@
<parent> <parent>
<groupId>com.foxinmy</groupId> <groupId>com.foxinmy</groupId>
<artifactId>weixin4j</artifactId> <artifactId>weixin4j</artifactId>
<version>1.7.8</version> <version>1.7.9</version>
</parent> </parent>
<artifactId>weixin4j-server</artifactId> <artifactId>weixin4j-server</artifactId>
<version>1.1.8</version> <version>1.1.8</version>

View File

@ -6,7 +6,7 @@
<parent> <parent>
<groupId>com.foxinmy</groupId> <groupId>com.foxinmy</groupId>
<artifactId>weixin4j</artifactId> <artifactId>weixin4j</artifactId>
<version>1.7.8</version> <version>1.7.9</version>
</parent> </parent>
<artifactId>weixin4j-serverX</artifactId> <artifactId>weixin4j-serverX</artifactId>
<version>0.0.1</version> <version>0.0.1</version>