Is the response successful?

@return bool
518051
public function isSuccessful()
    {
        $isHttpSuccess = parent::isSuccessful();
        $isPurchaseSuccess = false;

        if (isset($this->data['paymentStatus']) && $this->data['paymentStatus'] == $this->successfulPaymentStatus) {
            $isPurchaseSuccess = true;
        }

        return ($isHttpSuccess && $isPurchaseSuccess);
    }
341782
public function check()
    {
        $response = Director::test($this->url);

        if ($response->getStatusCode() != 200) {
            return [
                EnvironmentCheck::ERROR,
                sprintf('Error retrieving "%s" (Code: %d)', $this->url, $response->getStatusCode())
            ];
        } elseif ($this->testString && (strpos($response->getBody(), $this->testString) === false)) {
            return [
                EnvironmentCheck::WARNING,
                sprintf('Success retrieving "%s", but string "%s" not found', $this->url, $this->testString)
            ];
        }
        return [
            EnvironmentCheck::OK,
            sprintf('Success retrieving "%s"', $this->url)
        ];
    }
869674
public function poll(): bool
    {
        // nothing to do?
        if (!$this->curlMultiMap) {
            return false;
        }

        do {
            $r = curl_multi_exec(
                $this->curlMultiHandle,
                $stillRunning
            );
        } while (CURLM_CALL_MULTI_PERFORM === $r);

        $messagesInQueue = 0;
        do {
            messageQueue:

            $status = curl_multi_info_read(
                $this->curlMultiHandle,
                $messagesInQueue
            );

            if ($status && CURLMSG_DONE === $status['msg']) {
                $resourceId = (int) $status['handle'];
                list(
                    $request,
                    $successCallback,
                    $errorCallback,
                    $retryCount) = $this->curlMultiMap[$resourceId];
                unset($this->curlMultiMap[$resourceId]);

                $curlHandle = $status['handle'];
                $curlResult = $this->parseResponse(curl_multi_getcontent($curlHandle), $curlHandle);
                $retry = false;

                if (self::STATUS_CURLERROR === $curlResult['status']) {
                    $e = new ClientException($curlResult['curl_errmsg'], $curlResult['curl_errno']);
                    $this->emit('exception', [$request, $e, &$retry, $retryCount]);

                    if ($retry) {
                        ++$retryCount;
                        $this->sendAsyncInternal($request, $successCallback, $errorCallback, $retryCount);
                        goto messageQueue;
                    }

                    $curlResult['request'] = $request;

                    if ($errorCallback) {
                        $errorCallback($curlResult);
                    }
                } elseif (self::STATUS_HTTPERROR === $curlResult['status']) {
                    $this->emit('error', [$request, $curlResult['response'], &$retry, $retryCount]);
                    $this->emit('error:'.$curlResult['http_code'], [$request, $curlResult['response'], &$retry, $retryCount]);

                    if ($retry) {
                        ++$retryCount;
                        $this->sendAsyncInternal($request, $successCallback, $errorCallback, $retryCount);
                        goto messageQueue;
                    }

                    $curlResult['request'] = $request;

                    if ($errorCallback) {
                        $errorCallback($curlResult);
                    }
                } else {
                    $this->emit('afterRequest', [$request, $curlResult['response']]);

                    if ($successCallback) {
                        $successCallback($curlResult['response']);
                    }
                }
            }
        } while ($messagesInQueue > 0);

        return count($this->curlMultiMap) > 0;
    }
1097334
public function confirmed()
    {
        if (in_array($this->default, ["y", "yes"], true)) {
            $this->prompt .= " [Y/n]";
        } else {
            $this->prompt .= " [y/N]";
        }

        $this->accept(['y', 'yes', 'n', 'no'], false);

        $response = strtolower($this->prompt());

        return (substr($response, 0, 1) === 'y');
    }
473874
public function isSuccessful()
    {
        if (!$this->testMdSignatures()) {
            return false;
        }

        return in_array($this->getStatus(), [self::STATUS_PENDING, self::STATUS_PROCESSED]);
    }
319589
public function successAction()
    {
        // get the response data
        $response = $this->getRequest()->getParams();

        // process
        try {
            $result = $this->validateResultUrl($response);

            if ($result) {
                $session = $this->_getCheckout();
                $session->unsAdyenRealOrderId();
                $session->setQuoteId($session->getAdyenQuoteId(true));
                $session->getQuote()->setIsActive(false)->save();
                $this->_redirect('checkout/onepage/success', array('utm_nooverride' => '1'));
            } else {
                $this->cancel();
            }
        } catch (Exception $e) {
            Mage::logException($e);
            throw $e;
        }
    }
746759
public function isSuccessful()
    {
        if (null === $this->data) {
            $this->initializeReport();
        }

        return isset($this->data['report']['state']) && 'successful' === $this->data['report']['state'];
    }
908436
private function result()
    {

        $ok = false;
        if (!$this->ok) {
            $ok = $this->onError();
        }
        if (!$ok) {
            if (!$this->ok) {

// If not valid, return an error message to the tool consumer if a return URL is provided
                if (!empty($this->returnUrl)) {
                    $errorUrl = $this->returnUrl;
                    if (strpos($errorUrl, '?') === false) {
                        $errorUrl .= '?';
                    } else {
                        $errorUrl .= '&';
                    }
                    if ($this->debugMode && !is_null($this->reason)) {
                        $errorUrl .= 'lti_errormsg=' . urlencode("Debug error: $this->reason");
                    } else {
                        $errorUrl .= 'lti_errormsg=' . urlencode($this->message);
                        if (!is_null($this->reason)) {
                            $errorUrl .= '&lti_errorlog=' . urlencode("Debug error: $this->reason");
                        }
                    }
                    if (!is_null($this->consumer) && isset($_POST['lti_message_type']) && ($_POST['lti_message_type'] === 'ContentItemSelectionRequest')) {
                        $formParams = array();
                        if (isset($_POST['data'])) {
                            $formParams['data'] = $_POST['data'];
                        }
                        $version = (isset($_POST['lti_version'])) ? $_POST['lti_version'] : self::LTI_VERSION1;
                        $formParams = $this->consumer->signParameters($errorUrl, 'ContentItemSelection', $version, $formParams);
                        $page = self::sendForm($errorUrl, $formParams);
                        echo $page;
                    } else {
                        header("Location: {$errorUrl}");
                    }
                    exit;
                } else {
                    if (!is_null($this->errorOutput)) {
                        echo $this->errorOutput;
                    } else if ($this->debugMode && !empty($this->reason)) {
                        echo "Debug error: {$this->reason}";
                    } else {
                        echo "Error: {$this->message}";
                    }
                }
            } else if (!is_null($this->redirectUrl)) {
                header("Location: {$this->redirectUrl}");
                exit;
            } else if (!is_null($this->output)) {
                echo $this->output;
            }
        }

    }
809041
def successful(self):
        """"""
        for result in self.results:
            if result.code == ResultCode.FAILED:
                return False
        return True
93463
public function validate(): bool
    {
        $valid = true;
        foreach ($this->_responses as $key => $response) {
            if ($response === null) {
                continue;
            }
            if (!$response->validate()) {
                $valid = false;
            }
        }
        return $valid && empty($this->_errors);
    }
955077
protected function success ($response = array (), $httpCode = 200)
	{
		
		if (!is_array ($response))
		{
			$response	= array ($response);
		}
		
		$this->view->response				= $response;
		$this->view->response['success']	= 1;
		$this->view->response['time']		= time ();
		
		if ($httpCode)
		{
			$this->httpStatus ($httpCode);
		}
		
		return TRUE;
		
	}
159149
public function isSuccessful()
    {
        // As per appendix F, 000 means the message was processed correctly
        if ((string) $this->data->Status->statusCode !== '000'
            || ($this->hasTransaction()
                && (string) $this->data->Payment->TxnList->Txn->approved !== 'Yes')) {
            return false;
        }

        return true;
    }
334050
public function areOK()
	{
		$dlist = array();
		$list = $this->getArrayCopy();

		foreach ($list as $response)
		{
			if ($response instanceof CFResponse)
			{
				$dlist[] = $response->isOK();
			}
		}

		return (array_search(false, $dlist, true) !== false) ? false : true;
	}
5406
protected function success()
    {
        $this->cleanup();

        if (empty($this->incidents)) {
            Log::warning(
                'The collector ' . config("{$this->configBase}.collector.name") . ' did not return any incidents ' .
                'which should be investigated for collector and/or configuration errors'
            );
        }

        Log::info(
            get_class($this) . ': ' .
            'Collector run completed for collector : ' . config("{$this->configBase}.collector.name")
        );

        return [
            'errorStatus'   => false,
            'errorMessage'  => 'Data successfully collected',
            'warningCount'  => $this->warningCount,
            'data'          => $this->incidents,
        ];
    }
280800
protected function send()
    {
        $this->logger->info(sprintf('Submitting to %s', Jobs::URL));

        try {
            $response = $this->api->send();
            $message = $response
                ? sprintf('Finish submitting. status: %s %s', $response->getStatusCode(), $response->getReasonPhrase())
                : 'Finish dry run';

            $this->logger->info($message);

            if ($response instanceof Response) {
                $this->logResponse($response);
            }

            return true;
        } catch (\GuzzleHttp\Exception\ConnectException $e) {
            // connection error
            $message = sprintf("Connection error occurred. %s\n\n%s", $e->getMessage(), $e->getTraceAsString());
        } catch (\GuzzleHttp\Exception\ClientException $e) {
            // 422 Unprocessable Entity
            $response = $e->getResponse();
            $message = sprintf('Client error occurred. status: %s %s', $response->getStatusCode(), $response->getReasonPhrase());
        } catch (\GuzzleHttp\Exception\ServerException $e) {
            // 500 Internal Server Error
            // 503 Service Unavailable
            $response = $e->getResponse();
            $message = sprintf('Server error occurred. status: %s %s', $response->getStatusCode(), $response->getReasonPhrase());
        }

        $this->logger->error($message);

        if (isset($response)) {
            $this->logResponse($response);
        }

        return false;
    }
204714
public function isKeyValid()
    {
        // Check to see if the key is valid
        $response = $this->sendRequest('key=' . $this->wordPressAPIKey . '&blog=' . $this->blogURL, $this->akismetServer, '/' . $this->akismetVersion . '/verify-key');
        return $response[1] == 'valid';
    }
1274016
public function persist(): bool
    {
        $success = true;
        foreach ($this->values as $key => $value) {
            $success &= $this->writeOption($key, $value);
        }

        return $success;
    }