mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2025-08-24 16:18:51 +08:00
parent
0ab307c34b
commit
c70706c9aa
@ -51,6 +51,10 @@ public class WxPayConfig {
|
|||||||
* 商户密钥.
|
* 商户密钥.
|
||||||
*/
|
*/
|
||||||
private String mchKey;
|
private String mchKey;
|
||||||
|
/**
|
||||||
|
* 企业支付密钥.
|
||||||
|
*/
|
||||||
|
private String entPayKey;
|
||||||
/**
|
/**
|
||||||
* 服务商模式下的子商户号.
|
* 服务商模式下的子商户号.
|
||||||
*/
|
*/
|
||||||
|
@ -3,6 +3,7 @@ package com.github.binarywang.wxpay.service.impl;
|
|||||||
import com.github.binarywang.wxpay.bean.entpay.*;
|
import com.github.binarywang.wxpay.bean.entpay.*;
|
||||||
import com.github.binarywang.wxpay.bean.request.WxPayDefaultRequest;
|
import com.github.binarywang.wxpay.bean.request.WxPayDefaultRequest;
|
||||||
import com.github.binarywang.wxpay.bean.result.BaseWxPayResult;
|
import com.github.binarywang.wxpay.bean.result.BaseWxPayResult;
|
||||||
|
import com.github.binarywang.wxpay.constant.WxPayConstants;
|
||||||
import com.github.binarywang.wxpay.exception.WxPayException;
|
import com.github.binarywang.wxpay.exception.WxPayException;
|
||||||
import com.github.binarywang.wxpay.service.EntPayService;
|
import com.github.binarywang.wxpay.service.EntPayService;
|
||||||
import com.github.binarywang.wxpay.service.WxPayService;
|
import com.github.binarywang.wxpay.service.WxPayService;
|
||||||
@ -135,7 +136,7 @@ public class EntPayServiceImpl implements EntPayService {
|
|||||||
public EntPayRedpackResult sendEnterpriseRedpack(EntPayRedpackRequest request) throws WxPayException {
|
public EntPayRedpackResult sendEnterpriseRedpack(EntPayRedpackRequest request) throws WxPayException {
|
||||||
//企业微信签名,需要在请求签名之前
|
//企业微信签名,需要在请求签名之前
|
||||||
request.setNonceStr(String.valueOf(System.currentTimeMillis()));
|
request.setNonceStr(String.valueOf(System.currentTimeMillis()));
|
||||||
request.setWorkWxSign(SignUtils.createEntSign(request.getActName(),request.getMchBillNo(),request.getMchId(),request.getNonceStr(),request.getReOpenid(),request.getTotalAmount(),request.getWxAppId(),"Hcf-X_dzLeaTIyK33okGmODK8sLzc7kLrgkWXOAoMbE","MD5"));
|
request.setWorkWxSign(SignUtils.createEntSign(request.getActName(), request.getMchBillNo(), request.getMchId(), request.getNonceStr(), request.getReOpenid(), request.getTotalAmount(), request.getWxAppId(), payService.getConfig().getEntPayKey(), WxPayConstants.SignType.MD5));
|
||||||
|
|
||||||
request.checkAndSign(this.payService.getConfig());
|
request.checkAndSign(this.payService.getConfig());
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user