提交 59b84a21 authored 作者: hzh's avatar hzh

支付回调调试

上级 5062987e
......@@ -48,11 +48,12 @@ public interface IWxPayService {
*
* @param timestamp 时间搓
* @param nonce nonce
* @param serialNo serialNo
* @param signature 签名
* @param result 支付通知密文
* @return 支付通知明文
*/
JsapiNotifyModel notify(String timestamp, String nonce, String signature, String result);
JsapiNotifyModel notify(String timestamp, String nonce, String serialNo, String signature, String result);
/**
* 退款
......
......@@ -48,7 +48,7 @@ public class WxPayServiceImpl implements IWxPayService {
/**
* 商户 API 证书序列号
*/
private String serialNo;
private String serialNo;
/**
* 获取证书序列号
......@@ -206,14 +206,13 @@ public class WxPayServiceImpl implements IWxPayService {
}
@Override
public JsapiNotifyModel notify(String timestamp, String nonce, String signature, String result) {
String serialNumber = getSerialNumber();
log.info("timestamp:{} nonce:{} serialNo:{} signature:{}", timestamp, nonce, serialNumber, signature);
public JsapiNotifyModel notify(String timestamp, String nonce,String serialNo, String signature, String result) {
log.info("timestamp:{} nonce:{} serialNo:{} signature:{}", timestamp, nonce, serialNo, signature);
log.info("支付通知密文 {}", result);
try {
// 需要通过证书序列号查找对应的证书,verifyNotify 中有验证证书的序列号
String plainText = WxPayKit.verifyNotify(
serialNumber,
serialNo,
result,
signature,
nonce,
......
......@@ -55,6 +55,7 @@ public class WeChatOrderPayServiceImpl implements IOrderPayService {
JsapiNotifyModel model = wxPayService.notify(
bodyJson.getString("timestamp"),
bodyJson.getString("nonce"),
bodyJson.getString("serialNo"),
bodyJson.getString("signature"),
bodyJson.getString("result")
);
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论