src/Auth/LeadpagesLogin.php
public function parseResponse($deleteTokenOnFail = false)
    {
        $responseArray = json_decode($this->response, true);
        if (isset($responseArray['error']) && $responseArray['error']) {
            // token should be unset assumed to be no longer valid
            unset($this->token);
            // delete token from data store if param is passed
            if ($deleteTokenOnFail) {
                $this->deleteToken();
            }
            return $this->response; 
        }
        $this->token = $responseArray['securityToken'];
        return 'success';
    }
public function parseResponse($deleteTokenOnFail = false)
    {
        $responseArray = json_decode($this->response, true);
        if (isset($responseArray['error']) && $responseArray['error']) {
            // token should be unset assumed to be no longer valid
            unset($this->token);
            // delete token from data store if param is passed
            if ($deleteTokenOnFail) {
                $this->deleteToken();
            }
            return $this->response; 
        }
        $this->token = $responseArray['securityToken'];
        return 'success';
    }
public function parseResponse ( $ deleteTokenOnFail = false ) { $ responseArray = json_decode ( $ this -> response , true ) ; if ( isset ( $ responseArray [ 'error' ] ) && $ responseArray [ 'error' ] ) { // token should be unset assumed to be no longer valid unset ( $ this -> token ) ; // delete token from data store if param is passed if ( $ deleteTokenOnFail ) { $ this -> deleteToken ( ) ; } return $ this -> response ; } $ this -> token = $ responseArray [ 'securityToken' ] ; return 'success' ; }
Parse response for call to Leadpages Login. If response does
not contain a error we will return a response with
HttpResponseCode and Message

@param bool $deleteTokenOnFail

@return string json encoded response for client to handle
Parse response for call to Leadpages Login . If response does not contain a error we will return a response with HttpResponseCode and Message