|
|
|
@@ -194,6 +194,9 @@ public class WxCashOutAdapterService implements CashOutAdapterService{ |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
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); |
|
|
|
Map signMap = null; |
|
|
|
try { |
|
|
|
@@ -259,6 +262,9 @@ public class WxCashOutAdapterService implements CashOutAdapterService{ |
|
|
|
|
|
|
|
@Override |
|
|
|
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); |
|
|
|
Map signMap = null; |
|
|
|
try { |
|
|
|
@@ -272,7 +278,7 @@ public class WxCashOutAdapterService implements CashOutAdapterService{ |
|
|
|
signMap.put("sign", signAgent); |
|
|
|
String response = null; |
|
|
|
try { |
|
|
|
response = WxPay.getTransferInfo(signMap, payAccount.getCertPath(), payAccount.getMchId()); |
|
|
|
response = WxPay.getTransferInfo(signMap, payAccount.getMerchantCertPath(), payAccount.getSubMchId()); |
|
|
|
} catch (Exception e) { |
|
|
|
log.error("零钱支付查询异常: " + e.getMessage(),e); |
|
|
|
throw new MallinkException(ErrorCode.REFUND_ORDER_ERROR.getCode(), "微信零钱支付查询接口异常"); |
|
|
|
|