From 303a1d326a5cd3ed21cc76d987a5aec327933bf1 Mon Sep 17 00:00:00 2001 From: egzosn Date: Sun, 9 Apr 2017 11:13:52 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=9F=9F=E5=90=8D=E6=9B=B4=E6=8D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 3f14568..f6e72dd 100644 --- a/README.md +++ b/README.md @@ -29,7 +29,7 @@ ###使用 这里不多说直接上代码 集群的话,友店可能会有bug。 -测试链接 : http://pay.egan.in/index.html +测试链接 : http://pay.egzosn.com/index.html 服务端+网页端详细使用与简单教程请看 [pay-java-demo](pay-java-demo?dir=1&filepath=pay-java-demo) From 0c8a0f8c5386fa4bacd984e6a6bf42846bd7c639 Mon Sep 17 00:00:00 2001 From: egzosn Date: Sun, 9 Apr 2017 11:27:31 +0800 Subject: [PATCH 2/2] =?UTF-8?q?demo=E6=B7=BB=E5=8A=A0=E4=BB=A3=E7=90=86?= =?UTF-8?q?=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../in/egan/pay/demo/service/PayResponse.java | 21 ++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/pay-java-demo/src/main/java/in/egan/pay/demo/service/PayResponse.java b/pay-java-demo/src/main/java/in/egan/pay/demo/service/PayResponse.java index 5fee84e..d0acaad 100644 --- a/pay-java-demo/src/main/java/in/egan/pay/demo/service/PayResponse.java +++ b/pay-java-demo/src/main/java/in/egan/pay/demo/service/PayResponse.java @@ -3,6 +3,7 @@ package in.egan.pay.demo.service; import in.egan.pay.ali.bean.AliTransactionType; +import in.egan.pay.common.http.HttpConfigStorage; import in.egan.pay.demo.entity.ApyAccount; import in.egan.pay.demo.entity.PayType; import in.egan.pay.demo.service.handler.AliPayMessageHandler; @@ -48,10 +49,28 @@ public class PayResponse { //根据不同的账户类型 初始化支付配置 this.service = apyAccount.getPayType().getPayService(apyAccount); this.storage = service.getPayConfigStorage(); - + //这里设置代理配置 +// service.setRequestTemplateConfigStorage(getHttpConfigStorage()); buildRouter(apyAccount.getPayId()); } + /** + * 获取http配置,如果配置为null则为默认配置,无代理。 + * 此处非必需 + * @return + */ + public HttpConfigStorage getHttpConfigStorage(){ + HttpConfigStorage httpConfigStorage = new HttpConfigStorage(); + //http代理地址 + httpConfigStorage.setHttpProxyHost("192.168.1.69"); + //代理端口 + httpConfigStorage.setHttpProxyPort(3308); + //代理用户名 + httpConfigStorage.setHttpProxyUsername("user"); + //代理密码 + httpConfigStorage.setHttpProxyPassword("password"); + return httpConfigStorage; + } /**