wuhongshuang 3 lat temu
rodzic
commit
b40b818360

+ 1 - 22
src/main/java/com/szwl/controller/TOrderController.java

@@ -82,28 +82,7 @@ public class TOrderController {
      */
     @ApiOperation(value = "请求在线支付 主扫")
     @RequestMapping("/aliPay")
-    public String alipayforward(String wx, String zfb, HttpServletRequest req, HttpServletResponse resp) throws Exception {
-        String userAgent = req.getHeader("User-Agent");
-//        log.info("userAgent:{}",userAgent);
-        if (userAgent.contains("MicroMessenger")){ // 微信
-//            resp.sendRedirect("https://trade.joinpay.com/wxPay.action?trxNo=100221100684720837");
-//            resp.sendRedirect(weixin);
-//            req.getRequestDispatcher(weixin).forward(req,resp);
-//            resp.sendRedirect(redirect:weixin);
-            return "redirect:"+wx;
-//            return wx;
-        }else if(userAgent.contains("AlipayClient")){ // 支付宝
-//            resp.sendRedirect("https://qr.alipay.com/bax04313rso7xxpoizgx258a");
-//            resp.sendRedirect(apipay);
-            return "redirect:"+zfb;
-//            return zfb;
-        }
-//        resp.sendRedirect(weixin);
-        return "请使用支付宝或微信扫码!";
-    }
-    @ApiOperation(value = "请求在线支付 主扫")
-    @RequestMapping("/aliPay2")
-    public RedirectView alipayforward2(String wx, String zfb, HttpServletRequest req, HttpServletResponse resp) throws Exception {
+    public RedirectView alipayforward(String wx, String zfb, HttpServletRequest req, HttpServletResponse resp) throws Exception {
         String userAgent = req.getHeader("User-Agent");
         RedirectView redirectTarget = new RedirectView();
         redirectTarget.setContextRelative(true);