|
|
|
@@ -33,6 +33,7 @@ import com.iformall.mapper.WxPayAccountMapper; |
|
|
|
import com.iformall.mapper.WxPayOrderMapper; |
|
|
|
import com.iformall.mapper.WxRefundOrderMapper; |
|
|
|
import com.iformall.pay.WxCashOutP; |
|
|
|
import com.iformall.pay.WxCashOutPV3; |
|
|
|
import com.iformall.pay.WxCashOutQueryP; |
|
|
|
import com.iformall.pay.WxPay; |
|
|
|
import com.iformall.pay.WxPayment; |
|
|
|
@@ -46,6 +47,7 @@ import com.iformall.service.pay.service.refund.entity.RefundAdapterResult; |
|
|
|
import com.iformall.service.pay.service.refund.entity.RefundNotifyAdapterResult; |
|
|
|
import com.iformall.utils.BeanUtils; |
|
|
|
import com.iformall.utils.CipherUtil; |
|
|
|
import com.iformall.utils.DateUtils; |
|
|
|
import com.iformall.utils.MaUtil; |
|
|
|
import com.iformall.utils.Utility; |
|
|
|
import com.iformall.utils.XmlUtil; |
|
|
|
@@ -217,7 +219,7 @@ public class WxCashOutAdapterService implements CashOutAdapterService{ |
|
|
|
} |
|
|
|
String response = null; |
|
|
|
try { |
|
|
|
response = WxPay.merchantTranferChange(payService,""); |
|
|
|
response = WxPay.merchantTranferChange(payService,generateWxCashOutPV3(payAccount, cAppInfo, cashOut)); |
|
|
|
} catch (Exception e) { |
|
|
|
log.error("零钱支付异常: " + e.getMessage(),e); |
|
|
|
return new CashOutAdapterResult(false, EnumCashOutStatus.FAIL.getCode(), "微信零钱支付接口调用异常", null); |
|
|
|
@@ -230,6 +232,25 @@ public class WxCashOutAdapterService implements CashOutAdapterService{ |
|
|
|
// } |
|
|
|
} |
|
|
|
|
|
|
|
private WxCashOutPV3 generateWxCashOutPV3(WxPayAccount payAccount,WxAppinfo appInfo,WxCashOut cashOut) { |
|
|
|
String noncestr = Utility.generate32UUID(); |
|
|
|
WxCashOutPV3 wxCashOutPv3 = new WxCashOutPV3(); |
|
|
|
wxCashOutPv3.setAppid(appInfo.getAppId()); |
|
|
|
wxCashOutPv3.setOut_batch_no(String.valueOf(cashOut.getId())); |
|
|
|
wxCashOutPv3.setBatch_name(cashOut.getMerchantName()+"提现"); |
|
|
|
|
|
|
|
// wxCashOutP.setMch_appid(appInfo.getAppId()); |
|
|
|
// wxCashOutP.setMchid(payAccount.getSubMchId()); |
|
|
|
// wxCashOutP.setNonce_str(noncestr); |
|
|
|
// wxCashOutP.setAmount(cashOut.getTotalFee()); |
|
|
|
// wxCashOutP.setCheck_name("NO_CHECK"); |
|
|
|
// wxCashOutP.setDesc("客户结算"); |
|
|
|
// wxCashOutP.setOpenid(cashOut.getReciveOpenId()); |
|
|
|
// wxCashOutP.setPartner_trade_no(String.valueOf(cashOut.getId())); |
|
|
|
return wxCashOutPv3; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// /** |
|
|
|
// * https://pay.weixin.qq.com/wiki/doc/api/tools/mch_pay.php?chapter=14_2 |
|
|
|
// * |
|
|
|
|