소스 검색

插件方法替换

Cherry 2 년 전
부모
커밋
11dde3bf56
1개의 변경된 파일6개의 추가작업 그리고 3개의 파일을 삭제
  1. 6 3
      addons/epay/library/Service.php

+ 6 - 3
addons/epay/library/Service.php

@@ -70,7 +70,8 @@ class Service
                 if ($isWechat || $config['scanpay']) {
                     Session::set("alipayorderdata", $params);
                     $url = addon_url('epay/api/alipay', [], true, true);
-                    return RedirectResponse::create($url);
+//                    return RedirectResponse::create($url);
+                    return (new Response($url));
                 } elseif ($request->isMobile()) {
                     $method = 'wap';
                 }
@@ -124,7 +125,8 @@ class Service
                 } else {
                     Session::set("wechatorderdata", $params);
                     $url = addon_url('epay/api/wechat', [], true, true);
-                    return RedirectResponse::create($url);
+                    //return RedirectResponse::create($url);
+                    return (new Response($url));
                 }
             }
 
@@ -178,7 +180,8 @@ class Service
 
         //使用重写的Response类、RedirectResponse、Collection类
         if ($result instanceof \Symfony\Component\HttpFoundation\RedirectResponse) {
-            $result = RedirectResponse::create($result->getTargetUrl());
+//            $result = RedirectResponse::create($result->getTargetUrl());
+            $result = (new Response($result->getTargetUrl()));
         } elseif ($result instanceof \Symfony\Component\HttpFoundation\Response) {
             $result = Response::create($result->getContent());
         } elseif ($result instanceof \Yansongda\Supports\Collection) {