rabin 1 year ago
parent
commit
70941c3804
1 changed files with 14 additions and 1 deletions
  1. 14 1
      src/bao/connect/api/Notify.php

+ 14 - 1
src/bao/connect/api/Notify.php

@@ -16,6 +16,18 @@ class Notify extends Api
         list($connect_id, $api_id, $order_id) = explode('|', $s);
         unset($input['s']);
         unset($input['l']);
+        if (!$input) {
+            $input = file_get_contents("php://input");
+            if ($input) {
+                $input = json_decode($input, true);
+                if (isset($input['s'])) {
+                    unset($input['s']);
+                }
+                if (isset($input['l'])) {
+                    unset($input['l']);
+                }
+            }
+        }
         $this->load($input, $connect_id, $api_id, $order_id);
     }
 
@@ -74,8 +86,9 @@ class Notify extends Api
             $update['channel_callback'] = json_encode($input, JSON_UNESCAPED_UNICODE);
             $update['channel_callback_date'] = time();
             Dever::load('order', 'seller')->notify($order, $msg, $update);
+            echo $this->info['notify_success'];die;
         }
-        echo $this->info['notify_success'];die;
+        echo 'error';die;
     }
 
     private function error($msg)