Browse Source

Changes

master
主管理员 1 month ago
parent
commit
80e3763284
1 changed files with 19 additions and 0 deletions
  1. +19
    -0
      ruoyi-mall/src/main/java/com/cyl/h5/controller/PayNotifyController.java

+ 19
- 0
ruoyi-mall/src/main/java/com/cyl/h5/controller/PayNotifyController.java View File

@ -146,6 +146,25 @@ public class PayNotifyController {
.timestamp(timestamp)
.body(requestBody.toString())
.build();
//新版本微信公钥的支付回调
try {
WxPayOrderNotifyResult notify = mpWxPayService.notify(requestBody.toString());
PayNotifyMessageDTO message = new PayNotifyMessageDTO();
message.setOutTradeNo(Long.valueOf(notify.getOutTradeNo()));
message.setMemberId(Long.valueOf(notify.getAttach()));
message.setTradeStatus(Transaction.TradeStateEnum.SUCCESS);
message.setPayTime(new Date());
message.setTradeNo(notify.getTransactionId());
h5OrderService.payCallBack(message);
return;
}catch (Exception e){
log.error("新版本微信公钥的支付回调异常:{}", e.getMessage());
}
log.info("【requestParam】" + JSONObject.toJSON(requestParam));
//初始化了 RSAAutoCertificateConfig
Config config = WechatPayConfig.getInstance();


Loading…
Cancel
Save