service == null) { $this->service = new AppOrderService(); } return $this->service; } /** * Function Description:支付回调接口 * Function Name: notifyAction * * @return string * * @author 倪宗锋 */ public function notifyAction() { //获取传递过来的参数 $getContent = file_get_contents("php://input"); //数据处理及安全校验 $checkNotify = $this->getService()->notify($getContent); //设置返回值 $return = array( 'return_code' => 'SUCCESS', 'return_msg' => 'OK' ); if ($checkNotify['flag'] == false) { $return['return_code'] = 'FAIL'; $return['return_msg'] = empty($checkNotify['msg']) ? '未知错误!' : $checkNotify['msg']; } ob_clean(); return Util::arrayToXml($return);//转换为xml返回 } }