黄宗昌 2 năm trước cách đây
mục cha
commit
cb0bebb64c
1 tập tin đã thay đổi với 3 bổ sung1 xóa
  1. 3 1
      app/Http/Controllers/V1/PayController.php

+ 3 - 1
app/Http/Controllers/V1/PayController.php

xqd
@@ -65,7 +65,9 @@ class PayController extends Controller
             return $this->error("操作失败!");
         }
         if($pay_type == 1){ // 支付宝支付
-            $url = request()->url()."/#/me/member/join?order_id=".$order->id;
+            $protocol = isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? 'https' : 'http';
+            $domain = $protocol . '://' . $_SERVER['HTTP_HOST'];
+            $url = $domain."/#/me/member/join?order_id=".$order->id;
             $result = Factory::payment()->page()->pay("加入企业会员",$order->order_no,$order->money,$url);
             return $this->success($result->body);
         }else{