|
|
@@ -69,7 +69,7 @@ public abstract class AppAbstractComponentSMO extends AbstractComponentSMO {
|
|
|
* @return
|
|
|
* @throws Exception
|
|
|
*/
|
|
|
- protected Map<String, String> java110Payment(RestTemplate restTemplate,String feeName, String tradeType,String orderNum, double money, String openId) throws Exception {
|
|
|
+ protected Map<String, String> java110Payment(RestTemplate outRestTemplate,String feeName, String tradeType,String orderNum, double money, String openId) throws Exception {
|
|
|
logger.info("【小程序支付】 统一下单开始, 订单编号=" + orderNum);
|
|
|
SortedMap<String, String> resultMap = new TreeMap<String, String>();
|
|
|
//生成支付金额,开发环境处理支付金额数到0.01、0.02、0.03元
|
|
|
@@ -77,7 +77,7 @@ public abstract class AppAbstractComponentSMO extends AbstractComponentSMO {
|
|
|
double payAmount = PayUtil.getPayAmountByEnv(MappingCache.getValue("HC_ENV"), money);
|
|
|
//添加或更新支付记录(参数跟进自己业务需求添加)
|
|
|
|
|
|
- Map<String, String> resMap = this.java110UnifieldOrder(restTemplate,feeName, orderNum, tradeType, payAmount, openId);
|
|
|
+ Map<String, String> resMap = this.java110UnifieldOrder(outRestTemplate,feeName, orderNum, tradeType, payAmount, openId);
|
|
|
if ("SUCCESS".equals(resMap.get("return_code")) && "SUCCESS".equals(resMap.get("result_code"))) {
|
|
|
if(WechatAuthProperties.TRADE_TYPE_JSAPI.equals(tradeType)) {
|
|
|
resultMap.put("appId", wechatAuthProperties.getAppId());
|
|
|
@@ -109,7 +109,7 @@ public abstract class AppAbstractComponentSMO extends AbstractComponentSMO {
|
|
|
/**
|
|
|
* 小程序支付统一下单
|
|
|
*/
|
|
|
- private Map<String, String> java110UnifieldOrder(RestTemplate restTemplate, String feeName, String orderNum, String tradeType, double payAmount, String openid) throws Exception {
|
|
|
+ private Map<String, String> java110UnifieldOrder(RestTemplate outRestTemplate, String feeName, String orderNum, String tradeType, double payAmount, String openid) throws Exception {
|
|
|
//封装参数
|
|
|
SortedMap<String, String> paramMap = new TreeMap<String, String>();
|
|
|
paramMap.put("appid", wechatAuthProperties.getAppId());
|
|
|
@@ -128,7 +128,7 @@ public abstract class AppAbstractComponentSMO extends AbstractComponentSMO {
|
|
|
|
|
|
logger.debug("调用支付统一下单接口" + xmlData);
|
|
|
|
|
|
- ResponseEntity<String> responseEntity = restTemplate.postForEntity(
|
|
|
+ ResponseEntity<String> responseEntity = outRestTemplate.postForEntity(
|
|
|
wechatAuthProperties.getWxPayUnifiedOrder(), xmlData, String.class);
|
|
|
|
|
|
logger.debug("统一下单返回" + responseEntity);
|