| @@ -172,11 +172,12 @@ public class WxMiniAppPayV3AdapterService implements CDrivingPayService{ | |||||
| log.info("pay order v3, " + payReq.toString() + ", response: " + response.toString()); | log.info("pay order v3, " + payReq.toString() + ", response: " + response.toString()); | ||||
| return getOrderPResult(response); | return getOrderPResult(response); | ||||
| } else { | } else { | ||||
| throw new MallinkException(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"因电商收付通合单查询无法处理,暂时不支持合单支付"); | |||||
| //合单支付/小程序支付 | //合单支付/小程序支付 | ||||
| CombinePayCommonMiniAppReq payReq = generateCombinePayReqeust(payAccount,composeOrder,childOrders,productName,record,appInfo,openId,appInfo.getAppId(),currentDate,isShare); | |||||
| String response = WxPayV3.payCombineCommonWithMiniApp(payService, payReq); | |||||
| log.info("pay order v3," + payReq.toString() + ", response: " + response.toString()); | |||||
| return getOrderPResult(response); | |||||
| // CombinePayCommonMiniAppReq payReq = generateCombinePayReqeust(payAccount,composeOrder,childOrders,productName,record,appInfo,openId,appInfo.getAppId(),currentDate,isShare); | |||||
| // String response = WxPayV3.payCombineCommonWithMiniApp(payService, payReq); | |||||
| // log.info("pay order v3," + payReq.toString() + ", response: " + response.toString()); | |||||
| // return getOrderPResult(response); | |||||
| } | } | ||||
| } | } | ||||
| @@ -199,6 +200,7 @@ public class WxMiniAppPayV3AdapterService implements CDrivingPayService{ | |||||
| private PayQueryAdapterResult getPayCombineQueryResult(String response) { | private PayQueryAdapterResult getPayCombineQueryResult(String response) { | ||||
| JSONObject result = JSON.parseObject(response); | JSONObject result = JSON.parseObject(response); | ||||
| //只有各子订单的状态,没有统一的状态,暂时无法处理 | |||||
| JSONArray subOrders = result.getJSONArray("sub_orders"); | JSONArray subOrders = result.getJSONArray("sub_orders"); | ||||
| String transtionId = result.getString("transaction_id"); | String transtionId = result.getString("transaction_id"); | ||||
| String tradeState = result.getString("trade_state"); | String tradeState = result.getString("trade_state"); | ||||
| @@ -228,13 +230,14 @@ public class WxMiniAppPayV3AdapterService implements CDrivingPayService{ | |||||
| } | } | ||||
| return getPayCommonQueryResult(response); | return getPayCommonQueryResult(response); | ||||
| }else { | }else { | ||||
| req.setOut_trade_no(String.valueOf(oldRecord.getId())); | |||||
| String response = WxPayV3.payCombineQuery(payService, req); | |||||
| if (StringUtils.isBlank(response)){ | |||||
| log.error("pay combine v3 query response is null."+JSON.toJSONString(req)); | |||||
| throw new MallinkException(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"pay common v3 query response is null."+JSON.toJSONString(req)); | |||||
| } | |||||
| return getPayCombineQueryResult(response); | |||||
| throw new MallinkException(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"因电商收付通合单查询无法处理,暂时不支持合单支付查询"); | |||||
| // req.setOut_trade_no(String.valueOf(oldRecord.getId())); | |||||
| // String response = WxPayV3.payCombineQuery(payService, req); | |||||
| // if (StringUtils.isBlank(response)){ | |||||
| // log.error("pay combine v3 query response is null."+JSON.toJSONString(req)); | |||||
| // throw new MallinkException(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"pay common v3 query response is null."+JSON.toJSONString(req)); | |||||
| // } | |||||
| // return getPayCombineQueryResult(response); | |||||
| } | } | ||||
| } | } | ||||