dever 6 years ago
parent
commit
59cf5ce40c
1 changed files with 4 additions and 4 deletions
  1. 4 4
      lib/Wechat.php

+ 4 - 4
lib/Wechat.php

@@ -9,7 +9,7 @@ class Wechat extends Core
 		$project = Dever::project('pay');
 		$this->config = new \WxPayConfig();
 		# 通知接口
-		$config['notify'] = 'http://trade.5dev.cn/pay/pay/notify.php';
+		$config['notify'] = $this->url($config['type'], $config['id']);
 		# 证书
 		$config['ssl'] = array
 		(
@@ -25,11 +25,11 @@ class Wechat extends Core
 	 */
 	public function notify()
 	{
-		$receipt = $_REQUEST;
-		if ($receipt == null) {
+		$receipt = false;
+		if (!$receipt) {
 			$receipt = file_get_contents("php://input");
 		}
-		if ($receipt == null) {
+		if (!$receipt) {
 			$receipt = isset($GLOBALS['HTTP_RAW_POST_DATA']) ? $GLOBALS['HTTP_RAW_POST_DATA'] : $_POST;
 		}