diff --git a/webht/third_party/pay/controllers/WxpayService.php b/webht/third_party/pay/controllers/WxpayService.php index e073dbd1..5f7f8e74 100644 --- a/webht/third_party/pay/controllers/WxpayService.php +++ b/webht/third_party/pay/controllers/WxpayService.php @@ -29,12 +29,14 @@ log_message('error','notify begin ----'); $response['return_msg'] = ''; $GLOBALS['__WX_SITE_NAME__'] = $site; $this->wx_site_config = $this->config->item($GLOBALS['__WX_SITE_NAME__'], 'wxpay'); - if (!isset($GLOBALS['HTTP_RAW_POST_DATA'])) { + $raw_post_data = file_get_contents('php://input'); +// log_message('error',var_export($raw_post_data, 1)); + if (empty($raw_post_data) ){ # 如果没有数据,直接返回失败 return $this->response_to_wx($response); } //获取通知的数据 - $xml = $GLOBALS['HTTP_RAW_POST_DATA']; + $xml = $raw_post_data; $xml_arr = from_xml($xml); // log_message('error',var_export($xml_arr, 1)); if ($this->check_sign($xml_arr) !== true) {