예제 #1
0
 /**
  * 回调入口
  * @param bool $needSign 是否需要签名输出
  */
 public final function Handle($needSign = true)
 {
     $msg = "OK";
     //当返回false的时候,表示notify中调用NotifyCallBack回调失败获取签名校验失败,此时直接回复失败
     $result = $this->wxPayApi->notify(array($this, 'NotifyCallBack'), $msg);
     if ($result == false) {
         $this->SetReturn_code("FAIL");
         $this->SetReturn_msg($msg);
         $this->ReplyNotify(false);
         return;
     } else {
         //该分支在成功回调到NotifyCallBack方法,处理完成之后流程
         $this->SetReturn_code("SUCCESS");
         $this->SetReturn_msg("OK");
     }
     $this->ReplyNotify($needSign);
 }