微信支付订单微信返回参数:keys:nonce_str value:End90hmnzAlIdI3J
微信支付订单微信返回参数:keys:trade_type value:JSAPI
微信支付订单微信返回参数:keys:return_msg value:OK
微信支付订单微信返回参数:keys:result_code value:SUCCESS
微信支付订单微信返回参数:keys:mch_id value:1680997416
微信支付订单微信返回参数:keys:return_code value:SUCCESS
微信支付订单微信返回参数:keys:prepay_id value:wx112224215515409cf67b8bb34f620f0000
请问你的问题解决了吗 我也遇到同样问题
异步支付结果通知么?
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import java.io.BufferedReader;
import java.io.IOException;
import java.util.stream.Collectors;
@RestController
public class WeixinNotifyController {
@RequestMapping(value = "/weixin", method = RequestMethod.POST)
@ResponseBody
public String notify(HttpServletRequest request) {
String result;
try {
// 读取请求体
String requestBody = new BufferedReader(request.getReader()).lines().collect(Collectors.joining());
// 验证请求签名(具体实现根据您的安全要求)
// verifySignature(request, requestBody);
// 记录接收到的数据
LOGGER.info("微信支付通知收到: {}", requestBody);
// 处理通知数据
WeixinNotifyService weixinNotifyService = new WeixinNotifyService();
weixinNotifyService.notify(requestBody);
result = WeixinRespCheckUtil.WEIXIN_NOTIFY_SUCC;
} catch (Exception e) {
QMonitor.recordOne(PayMonitorConst.weixin_notify_exception);
LOGGER.error("微信支付通知处理错误", e);
result = WeixinRespCheckUtil.WEIXIN_NOTIFY_FAIL;
}
return result;
}
}