code: @RequestMapping("/web")
      public void webPay(@RequestParam("orderNumber") String orderNumber, HttpServletResponse resp){
  
          WebPayDetail detail = new WebPayDetail(orderNumber, "测试订单-" + orderNumber, "0.01");
          String form = alipayService.webPay(detail);
          logger.info("web pay form: {}", form);
          try {
              resp.setContentType("text/html;charset=UTF-8");
              resp.setCharacterEncoding("UTF-8");
              resp.getWriter().write(form);
              resp.setStatus(HttpServletResponse.SC_OK);
          } catch (IOException e) {
              // ignore
          }
      }
docs: WEB支付