From be06cd6731dd2a5d1a9bbbd3d12a2f7b3a00c966 Mon Sep 17 00:00:00 2001 From: Pu Zhibing <393733352@qq.com> Date: 星期一, 14 七月 2025 09:30:00 +0800 Subject: [PATCH] 移除mq --- ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/ali/v2/AppletPayUtil.java | 8 ++++++-- 1 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/ali/v2/AppletPayUtil.java b/ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/ali/v2/AppletPayUtil.java index f589d48..bb0156c 100644 --- a/ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/ali/v2/AppletPayUtil.java +++ b/ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/ali/v2/AppletPayUtil.java @@ -1,6 +1,7 @@ package com.ruoyi.payment.ali.v2; import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; import com.alipay.api.AlipayClient; import com.alipay.api.AlipayConfig; import com.alipay.api.DefaultAlipayClient; @@ -60,10 +61,11 @@ //异步返回参数 model.setPassbackParams(pojo.getPassbackParams()); request.setBizModel(model); + request.setNotifyUrl(aliProperties.getNotifyUrl() + pojo.getNotifyUrl()); AlipayTradeCreateResponse response = alipayClient.execute(request); log.info("-----调起支付宝支付-----"); - log.info("请求参数:{}", pojo); + log.info("请求参数:{}", JSON.toJSONString(request)); log.info("返回结果:{}", response.getBody()); if (response.isSuccess()) { return PaymentResp.build(response.getOutTradeNo(), response.getTradeNo()); @@ -130,7 +132,9 @@ log.info("请求参数:{}", req); log.info("返回结果:{}", response.getBody()); if (response.isSuccess()) { - return JSON.parseObject(response.getBody(), RefundResp.class); + JSONObject jsonObject = JSON.parseObject(response.getBody()); + RefundResp alipay_trade_refund_response = jsonObject.getObject("alipay_trade_refund_response", RefundResp.class); + return alipay_trade_refund_response; } }catch (Exception e){ e.printStackTrace(); -- Gitblit v1.7.1