mirror of
https://gitee.com/binary/weixin-java-tools.git
synced 2026-03-10 00:13:40 +08:00
🎨 【微信支付】优化复用订单通知SignatureHeader
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
package com.github.binarywang.wxpay.service;
|
||||
|
||||
import com.github.binarywang.wxpay.bean.ecommerce.SignatureHeader;
|
||||
import com.github.binarywang.wxpay.bean.notify.SignatureHeader;
|
||||
import com.github.binarywang.wxpay.bean.profitsharingV3.*;
|
||||
import com.github.binarywang.wxpay.exception.WxPayException;
|
||||
|
||||
@@ -238,7 +238,7 @@ public interface ProfitSharingV3Service {
|
||||
* @throws WxPayException the wx pay exception
|
||||
* @see <a href="https://pay.weixin.qq.com/wiki/doc/apiv3/apis/chapter8_1_10.shtml">微信文档</a>
|
||||
*/
|
||||
ProfitSharingNotifyResult getProfitSharingNotifyData(String notifyData, SignatureHeader header) throws WxPayException;
|
||||
ProfitSharingNotifyResult getProfitSharingNotifyResult(String notifyData, SignatureHeader header) throws WxPayException;
|
||||
|
||||
/**
|
||||
* <pre>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package com.github.binarywang.wxpay.service.impl;
|
||||
|
||||
import com.github.binarywang.wxpay.bean.ecommerce.SignatureHeader;
|
||||
import com.github.binarywang.wxpay.bean.notify.SignatureHeader;
|
||||
import com.github.binarywang.wxpay.bean.profitsharingV3.*;
|
||||
import com.github.binarywang.wxpay.exception.WxPayException;
|
||||
import com.github.binarywang.wxpay.service.ProfitSharingV3Service;
|
||||
@@ -120,7 +120,7 @@ public class ProfitSharingV3ServiceImpl implements ProfitSharingV3Service {
|
||||
}
|
||||
|
||||
@Override
|
||||
public ProfitSharingNotifyResult getProfitSharingNotifyData(String notifyData, SignatureHeader header) throws WxPayException {
|
||||
public ProfitSharingNotifyResult getProfitSharingNotifyResult(String notifyData, SignatureHeader header) throws WxPayException {
|
||||
ProfitSharingNotifyData response = parseNotifyData(notifyData, header);
|
||||
ProfitSharingNotifyData.Resource resource = response.getResource();
|
||||
String cipherText = resource.getCipherText();
|
||||
@@ -170,7 +170,7 @@ public class ProfitSharingV3ServiceImpl implements ProfitSharingV3Service {
|
||||
if (verifier == null) {
|
||||
throw new WxPayException("证书检验对象为空");
|
||||
}
|
||||
return verifier.verify(header.getSerialNo(),
|
||||
beforeSign.getBytes(StandardCharsets.UTF_8), header.getSigned());
|
||||
return verifier.verify(header.getSerial(),
|
||||
beforeSign.getBytes(StandardCharsets.UTF_8), header.getSignature());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user