| @@ -194,6 +194,9 @@ public class WxCashOutAdapterService implements CashOutAdapterService{ | |||||
| */ | */ | ||||
| @Override | @Override | ||||
| public CashOutAdapterResult cashOut(WxAppinfo appInfo, WxPayAccount payAccount, WxCashOut cashOut) { | public CashOutAdapterResult cashOut(WxAppinfo appInfo, WxPayAccount payAccount, WxCashOut cashOut) { | ||||
| if (StringUtils.isBlank(payAccount.getMerchantCertPath())) { | |||||
| return new CashOutAdapterResult(false, EnumCashOutStatus.FAIL.getCode(), "零钱支付失败。商户证书为空。请联系管理员配置。", null); | |||||
| } | |||||
| WxCashOutP wxCashOutP = generateWxCashOutP(payAccount, appInfo, cashOut); | WxCashOutP wxCashOutP = generateWxCashOutP(payAccount, appInfo, cashOut); | ||||
| Map signMap = null; | Map signMap = null; | ||||
| try { | try { | ||||
| @@ -259,6 +262,9 @@ public class WxCashOutAdapterService implements CashOutAdapterService{ | |||||
| @Override | @Override | ||||
| public CashOutAdapterResult queryCashOut(WxAppinfo appInfo, WxPayAccount payAccount, WxCashOut cashOut) { | public CashOutAdapterResult queryCashOut(WxAppinfo appInfo, WxPayAccount payAccount, WxCashOut cashOut) { | ||||
| if (StringUtils.isBlank(payAccount.getMerchantCertPath())) { | |||||
| return new CashOutAdapterResult(false, EnumCashOutStatus.FAIL.getCode(), "零钱支付失败。商户证书为空。请联系管理员配置。", null); | |||||
| } | |||||
| WxCashOutQueryP wxCashOutP = generateQueryWxCashOutP(payAccount, appInfo, cashOut); | WxCashOutQueryP wxCashOutP = generateQueryWxCashOutP(payAccount, appInfo, cashOut); | ||||
| Map signMap = null; | Map signMap = null; | ||||
| try { | try { | ||||
| @@ -272,7 +278,7 @@ public class WxCashOutAdapterService implements CashOutAdapterService{ | |||||
| signMap.put("sign", signAgent); | signMap.put("sign", signAgent); | ||||
| String response = null; | String response = null; | ||||
| try { | try { | ||||
| response = WxPay.getTransferInfo(signMap, payAccount.getCertPath(), payAccount.getMchId()); | |||||
| response = WxPay.getTransferInfo(signMap, payAccount.getMerchantCertPath(), payAccount.getSubMchId()); | |||||
| } catch (Exception e) { | } catch (Exception e) { | ||||
| log.error("零钱支付查询异常: " + e.getMessage(),e); | log.error("零钱支付查询异常: " + e.getMessage(),e); | ||||
| throw new MallinkException(ErrorCode.REFUND_ORDER_ERROR.getCode(), "微信零钱支付查询接口异常"); | throw new MallinkException(ErrorCode.REFUND_ORDER_ERROR.getCode(), "微信零钱支付查询接口异常"); | ||||