public function replace(App_Account_AlipayUserInfoDm $dm)
 {
     if (!($data = $dm->getData())) {
         return false;
     }
     return $this->_loadDao()->replace($data);
 }
 public function getResponseInfo()
 {
     $result = $this->checkStatus();
     if ($result !== true) {
         return new PwError($result);
     }
     $sessionId = Pw::getCookie($this->_getLoginSessionService()->getCookieName());
     $sessionInfo = App_Account_LoginSessionBo::getInstance($sessionId)->getSession();
     if (!$sessionId || !$sessionInfo) {
         return new PwError('验证会话失败,请重试');
     }
     //计算得出通知验证结果
     if (!$this->_verifyReturn()) {
         return new PwError('验证会话失败,请重试');
     }
     //支付宝用户号
     $user_id = intval($_GET['user_id']);
     //授权令牌
     $token = trim($_GET['token']);
     $real_name = trim($_GET['real_name']);
     if (!$user_id) {
         return new PwError('获取用户信息失败,请重试');
     }
     //更新数据库
     $dm = new App_Account_AlipayUserInfoDm();
     $dm->setUserId($user_id)->setRealName($real_name)->setCreateAt(Pw::getTime());
     $this->_getAlipayUserInfoDs()->replace($dm);
     //更新session
     $this->updateSession($user_id, $real_name, 'alipay');
     return true;
 }