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

支付回调调试

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