|
|
@@ -1,8 +1,10 @@
|
|
|
package com.uas.platform.b2c.fa.payment.service.impl;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.uas.platform.b2c.core.config.SysConf;
|
|
|
import com.uas.platform.b2c.fa.payment.constant.B2CField;
|
|
|
import com.uas.platform.b2c.fa.payment.constant.PingAnField;
|
|
|
+import com.uas.platform.b2c.fa.payment.constant.PingAnRequestUrlPostfix;
|
|
|
import com.uas.platform.b2c.fa.payment.constant.StringConstant;
|
|
|
import com.uas.platform.b2c.fa.payment.service.BankReceiptsService;
|
|
|
import com.uas.platform.b2c.fa.payment.support.UserInfoSupport;
|
|
|
@@ -27,10 +29,13 @@ public class BankReceiptsServiceImpl implements BankReceiptsService {
|
|
|
|
|
|
private final UserInfoSupport userInfoSupport;
|
|
|
|
|
|
+ private final SysConf sysConf;
|
|
|
+
|
|
|
@Autowired
|
|
|
- public BankReceiptsServiceImpl(RestTemplate restTemplate, UserInfoSupport userInfoSupport) {
|
|
|
+ public BankReceiptsServiceImpl(RestTemplate restTemplate, UserInfoSupport userInfoSupport, SysConf sysConf) {
|
|
|
this.restTemplate = restTemplate;
|
|
|
this.userInfoSupport = userInfoSupport;
|
|
|
+ this.sysConf = sysConf;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
@@ -46,7 +51,7 @@ public class BankReceiptsServiceImpl implements BankReceiptsService {
|
|
|
map.put(B2CField.ENUU, "1000103423");
|
|
|
map.put(B2CField.DISSOCIATIVE, Boolean.FALSE.toString());
|
|
|
map.put(B2CField.ISPERSONAL, Boolean.TRUE.toString());
|
|
|
- String httpEntity = restTemplate.postForObject("http://192.168.253.119:20280/UnionPay/bindCard", map, String.class);
|
|
|
+ String httpEntity = restTemplate.postForObject(sysConf.getPingAnUrl() + "/UnionPay/bindCard", map, String.class);
|
|
|
return httpEntity;
|
|
|
}
|
|
|
|
|
|
@@ -59,7 +64,7 @@ public class BankReceiptsServiceImpl implements BankReceiptsService {
|
|
|
@Override
|
|
|
public String queryBindCard(Boolean isPersonal) {
|
|
|
Map<String, String> map = userInfoSupport.getUserInfoMap(isPersonal);
|
|
|
- String resultStr = restTemplate.postForObject("http://192.168.253.119:20280/UnionPay/bindCard/query", map, String.class);
|
|
|
+ String resultStr = restTemplate.postForObject(sysConf.getPingAnUrl() + "/UnionPay/bindCard/query", map, String.class);
|
|
|
return resultStr;
|
|
|
}
|
|
|
|
|
|
@@ -100,7 +105,7 @@ public class BankReceiptsServiceImpl implements BankReceiptsService {
|
|
|
isPersonal = true;
|
|
|
Map<String, String> infoMap = userInfoSupport.getUserInfoMap(isPersonal);
|
|
|
infoMap.putAll(map);
|
|
|
- String resultStr = restTemplate.postForObject("http://192.168.253.119:20280/UnionPay/sms", infoMap, String.class);
|
|
|
+ String resultStr = restTemplate.postForObject(sysConf.getPingAnUrl() + "/UnionPay/sms", infoMap, String.class);
|
|
|
System.out.println(resultStr);
|
|
|
return resultStr;
|
|
|
}
|
|
|
@@ -159,7 +164,7 @@ public class BankReceiptsServiceImpl implements BankReceiptsService {
|
|
|
map.put("payCardType", "01");
|
|
|
}
|
|
|
|
|
|
- String resultStr = restTemplate.postForObject("http://192.168.253.119:20280/UnionPay/pay", map, String.class);
|
|
|
+ String resultStr = restTemplate.postForObject(sysConf.getPingAnUrl() + "/UnionPay/pay", map, String.class);
|
|
|
System.out.println(resultStr);
|
|
|
/*
|
|
|
* orderId 支付的流水号必须和发送短信的接口一致
|
|
|
@@ -199,7 +204,7 @@ public class BankReceiptsServiceImpl implements BankReceiptsService {
|
|
|
} else {
|
|
|
//TODO
|
|
|
}
|
|
|
- String loadHtml = restTemplate.postForObject("http://192.168.253.119:20280/eBank/pay", map, String.class);
|
|
|
+ String loadHtml = restTemplate.postForObject(sysConf.getPingAnUrl() + PingAnRequestUrlPostfix.EBANKPAY, map, String.class);
|
|
|
return loadHtml;
|
|
|
}
|
|
|
|
|
|
@@ -221,7 +226,7 @@ public class BankReceiptsServiceImpl implements BankReceiptsService {
|
|
|
} else {
|
|
|
//TODO
|
|
|
}
|
|
|
- String loadHtml = restTemplate.postForObject("http://192.168.253.119:20280/weChat/pay", map, String.class);
|
|
|
+ String loadHtml = restTemplate.postForObject(sysConf.getPingAnUrl() + "/weChat/pay", map, String.class);
|
|
|
return loadHtml;
|
|
|
}
|
|
|
}
|