dever 6 years ago
parent
commit
fccb1590af
1 changed files with 9 additions and 1 deletions
  1. 9 1
      lib/Wechat.php

+ 9 - 1
lib/Wechat.php

@@ -25,7 +25,15 @@ class Wechat extends Core
 	 */
 	public function notify()
 	{
-		$this->log('支付回调-初始化', $_POST);
+		$receipt = $_REQUEST;
+		if ($receipt == null) {
+			$receipt = file_get_contents("php://input");
+		}
+		if ($receipt == null) {
+			$receipt = isset($GLOBALS['HTTP_RAW_POST_DATA']) ? $GLOBALS['HTTP_RAW_POST_DATA'] : $_POST;
+		}
+
+		$this->log('支付回调-初始化', $receipt);
 		$callback = new Callback();
 		$result = $callback->Handle($this->config, false);
 	}