1
0
mirror of synced 2026-10-19 05:56:26 +08:00

🎨 #3968【微信支付】修复微信支付api-host-url配置反向代理路径前缀时会导致v3签名异常的问题

This commit is contained in:
水依寒
2026-05-11 20:32:42 +08:00
committed by GitHub
parent bcb3110bd7
commit 24703be583
16 changed files with 164 additions and 9 deletions

View File

@@ -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");