🎨 #3968【微信支付】修复微信支付api-host-url配置反向代理路径前缀时会导致v3签名异常的问题
This commit is contained in:
@@ -2,6 +2,8 @@ package com.github.binarywang.wxpay.config;
|
||||
|
||||
import org.testng.annotations.Test;
|
||||
|
||||
import static org.testng.Assert.assertEquals;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
* Created by BinaryWang on 2017/6/18.
|
||||
@@ -38,6 +40,15 @@ public class WxPayConfigTest {
|
||||
payConfig.hashCode();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testApiHostUrlPath() {
|
||||
payConfig.setApiHostUrl("http://10.0.0.1:3128/");
|
||||
payConfig.setApiHostUrlPath("api-weixin/");
|
||||
assertEquals(payConfig.getApiHostUrl(), "http://10.0.0.1:3128");
|
||||
assertEquals(payConfig.getApiHostUrlPath(), "/api-weixin");
|
||||
assertEquals(payConfig.getApiHostWithPathPrefix(), "http://10.0.0.1:3128/api-weixin");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testInitSSLContext_base64() throws Exception {
|
||||
payConfig.setMchId("123");
|
||||
|
||||
Reference in New Issue
Block a user