mirror of
https://gitee.com/egzosn/pay-java-parent.git
synced 2026-05-19 07:31:36 +08:00
微信支付请求头增加商户公钥ID
This commit is contained in:
@@ -350,7 +350,13 @@ public class WxPayService extends BasePayService<WxPayConfigStorage> implements
|
||||
*/
|
||||
@Override
|
||||
public HttpStringEntity hookHttpEntity(HttpStringEntity entity) {
|
||||
entity.addHeader(new BasicHeader(WxConst.WECHATPAY_SERIAL, payConfigStorage.getCertEnvironment().getPlatformSerialNumber()));
|
||||
if (StringUtils.isNotEmpty(payConfigStorage.getKeyPublic())) {
|
||||
// 商户上送敏感信息时使用`微信支付平台公钥`加密
|
||||
entity.addHeader(new BasicHeader(WxConst.WECHATPAY_SERIAL, payConfigStorage.getKeyPublicId()));
|
||||
}
|
||||
else{
|
||||
entity.addHeader(new BasicHeader(WxConst.WECHATPAY_SERIAL, payConfigStorage.getCertEnvironment().getPlatformSerialNumber()));
|
||||
}
|
||||
return entity;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user