mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-08-24 16:18:51 +08:00
引入配置方法,使得微信支付能够支持仿真测试环境 #119
This commit is contained in:
parent
ab3b2249a9
commit
9e0fcb34d0
@ -445,7 +445,9 @@ public class WxMpPayServiceImpl implements WxMpPayService {
|
|||||||
public String createSign(Map<String, String> params, String signKey) {
|
public String createSign(Map<String, String> params, String signKey) {
|
||||||
if(this.getConfig().useSandboxForWxPay()){
|
if(this.getConfig().useSandboxForWxPay()){
|
||||||
//使用仿真测试环境
|
//使用仿真测试环境
|
||||||
return "ABCDEFGHIJKLMNOPQRSTUVWXYZ123456";
|
//TODO 目前测试发现,以下两行代码都会出问题,所以暂不建议使用这个仿真测试环境
|
||||||
|
signKey = "ABCDEFGHIJKLMNOPQRSTUVWXYZ123456";
|
||||||
|
//return "ABCDEFGHIJKLMNOPQRSTUVWXYZ123456";
|
||||||
}
|
}
|
||||||
|
|
||||||
SortedMap<String, String> sortedMap = new TreeMap<>(params);
|
SortedMap<String, String> sortedMap = new TreeMap<>(params);
|
||||||
|
@ -73,7 +73,10 @@ public class WxMpPayServiceImplTest {
|
|||||||
*/
|
*/
|
||||||
@Test
|
@Test
|
||||||
public void testRefundQuery() throws Exception {
|
public void testRefundQuery() throws Exception {
|
||||||
WxPayRefundQueryResult result = this.wxService.getPayService().refundQuery("1", "", "", "");
|
WxPayRefundQueryResult result;
|
||||||
|
|
||||||
|
result = this.wxService.getPayService().refundQuery("1", "", "", "");
|
||||||
|
System.err.println(result);
|
||||||
result = this.wxService.getPayService().refundQuery("", "2", "", "");
|
result = this.wxService.getPayService().refundQuery("", "2", "", "");
|
||||||
System.err.println(result);
|
System.err.println(result);
|
||||||
result = this.wxService.getPayService().refundQuery("", "", "3", "");
|
result = this.wxService.getPayService().refundQuery("", "", "3", "");
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<class name="me.chanjar.weixin.mp.api.WxMpBaseAPITest" />
|
<class name="me.chanjar.weixin.mp.api.WxMpBaseAPITest" />
|
||||||
<class name="me.chanjar.weixin.mp.api.WxMpMassMessageAPITest" />
|
<class name="me.chanjar.weixin.mp.api.WxMpMassMessageAPITest" />
|
||||||
<class name="me.chanjar.weixin.mp.api.impl.WxMpUserServiceImplTest" />
|
<class name="me.chanjar.weixin.mp.api.impl.WxMpUserServiceImplTest" />
|
||||||
<class name="me.chanjar.weixin.mp.api.impl.WxMpQrCodeServiceImplTest" />
|
<class name="me.chanjar.weixin.mp.api.impl.WxMpQrcodeServiceImplTest" />
|
||||||
<class name="me.chanjar.weixin.mp.api.WxMpShortUrlAPITest" />
|
<class name="me.chanjar.weixin.mp.api.WxMpShortUrlAPITest" />
|
||||||
<class name="me.chanjar.weixin.mp.api.WxMpMessageRouterTest" />
|
<class name="me.chanjar.weixin.mp.api.WxMpMessageRouterTest" />
|
||||||
<class name="me.chanjar.weixin.mp.api.WxMpJsAPITest" />
|
<class name="me.chanjar.weixin.mp.api.WxMpJsAPITest" />
|
||||||
|
Loading…
Reference in New Issue
Block a user