Zory 1 tháng trước cách đây
mục cha
commit
38febc9607

+ 28 - 0
app/controller/api/Notify.php

@@ -0,0 +1,28 @@
+<?php
+
+namespace app\controller\api;
+
+use app\extra\basic\Base;
+use LinFly\Annotation\Attributes\Route\Controller;
+use LinFly\Annotation\Attributes\Route\PostMapping;
+use support\Request;
+use support\Response;
+
+
+#[Controller("/notify")]
+class Notify extends Base
+{
+
+    #[PostMapping("douyin")]
+    public function getOrderNotify(Request $request): Response
+    {
+        try {
+            $param = $request->all();
+            echo getDateFull()."===支付返回\n";
+            print_r($param);
+            return success("ok");
+        } catch (\Throwable $th) {
+            return error($th->getMessage());
+        }
+    }
+}

+ 1 - 1
app/controller/api/Order.php

@@ -121,7 +121,7 @@ class Order extends Base
                 "order_sn"      => $order['order_sn'],
                 "order_sn"      => $order['order_sn'],
                 "total"         => $order['price'],
                 "total"         => $order['price'],
                 "name"          => $order['product']['product_name'],
                 "name"          => $order['product']['product_name'],
-                "notify_url"    => ""
+                "notify_url"    => "https://tran.jsshuita.cn/notify/douyin"
             ];
             ];
             $byteAuthorization = (new Pay)->config([
             $byteAuthorization = (new Pay)->config([
                 "appid"     => sConf("wechat.mini_appid"),
                 "appid"     => sConf("wechat.mini_appid"),

BIN
归档.zip