rabin 1 year ago
parent
commit
4741e68208
1 changed files with 7 additions and 3 deletions
  1. 7 3
      src/bao/connect/api/Notify.php

+ 7 - 3
src/bao/connect/api/Notify.php

@@ -170,12 +170,16 @@ class Notify extends Api
         //$param = '{"l":"notify.callback","t":"4-5-user_order","userid":"41438","order_id":"24020213181441438abbf5b39f","account":"15810090811","amount":"100","price":"104.1","state":"failed","user_order":"C2024020251094338265393","sign":"0447CC15F7D0218A1C5C09160A12A19A","voucher":""}';
         //$input = Dever::json_decode($param);
         $input = Dever::input();
-        $test = file_get_contents("php://input");
-        Dever::log($test, 'notify_test');
-        Dever::log($input, 'notify_test2');
         if (!isset($input['t'])) {
             $this->error('error');
         }
+        $file = file_get_contents("php://input");
+        if ($file) {
+            $file = json_decode($file, true);
+            if ($file) {
+                $input = array_merge($file, $input);
+            }
+        }
         $temp = explode('-', $input['t']);
         $connect_id = $temp[0];
         $api_id = $temp[1];