Final check balance function

@return \Phalcon\Http\Client\Response|string|void
@throws BaseException
191793
final public function balance()
    {
        $client = $this->client();
        $client->setOption(CURLOPT_HTTPHEADER, ['Authorization : '.$this->config->getProviderConfig()['access_key']]);
        $response = $client->{$this->config->getRequestMethod()}($this->config->getBalanceUri(),
            $this->config->getProviderConfig());

        return $this->getResponse($response);
    }
288560
public function checkIn() {
        $now = date('Y-m-d H:i:s');
        $serverRow = $this->_fetchServerRow();

        if (!$serverRow) {
            $serverRow = $this->createRow();
            $serverRow->hostname = gethostname();
            $lastCheckIn = $now;
        } else {
            $lastCheckIn = $serverRow->modified;
        }

        //  set the modified date manually, to make sure the record is updated.
        $serverRow->modified = $now;
        $serverId = $serverRow->save();

        return array(
            $serverId,
            $lastCheckIn
        );
    }
289095
public function getChecks()
	{
		$client = new \Guzzle\Service\Client('https://api.pingdom.com/api/2.0');

		/** @var $request \Guzzle\Http\Message\Request */
		$request = $client->get('checks', array('App-Key' => $this->token));
		$request->setAuth($this->username, $this->password);
		$response = $request->send();
		$response = json_decode($response->getBody(), true);

		return $response['checks'];
	}
591200
protected function getBalance() {
        if (!$this->_balance) {
            $this->_balance = new BalanceList($this->version, $this->solution['sid']);
        }

        return $this->_balance;
    }
668960
public function kick()
    {
        $request = new AccountLoginKickRequest($this->identifier);
        $response = new BaseResponse();
        return $this->client->sendRequest($request, $response);
    }
635108
public function performCheck()
    {
        $this->setEmailSendReceiveColl($this->getPersistCollection()->load());

        $lastSandedEmail = $this->getEmailSendReceiveColl()->count() - 1 >= 0 ?
            $this->getEmailSendReceiveColl()->at(
                $this->getEmailSendReceiveColl()->count() - 1
            )
            : null;
        if (null === $lastSandedEmail
            || empty($lastSandedEmail->getSentAt())
            || (time() - $lastSandedEmail->getSentAt()->getTimestamp()) > $this->getSendInterval()
        ) {
            $emailSendCheck = $this->createEmailSendReceive();

            $this->performSend($emailSendCheck);
        }
    }
454916
public function check($account, $checkType)
    {
        $request = new CheckFriendRequest($this->identifier, $account, $checkType);
        $response = new BaseResponse();
        return $this->client->sendRequest($request, $response);
    }
1044835
public function processPaymentAction()
    {
        $order = $this->checkRequest();

        return $this->getDebugPayment()->processCallback($order, $this->getCurrentRequest()->get('action'));
    }
197847
public function run_check() {
		$r = $this->run();

		if ( $r->return_code || !empty( $r->STDERR ) ) {
			throw new \RuntimeException( $r );
		}

		return $r;
	}
281484
public function getBalanceTransactionReference()
    {
        if (isset($this->data['object']) && 'charge' === $this->data['object']) {
            return $this->data['balance_transaction'];
        }
        if (isset($this->data['object']) && 'balance_transaction' === $this->data['object']) {
            return $this->data['id'];
        }
        if (isset($this->data['error']) && isset($this->data['error']['charge'])) {
            return $this->data['error']['charge'];
        }

        return null;
    }
850904
public function execute()
    {
        parent::execute();

        $balanceSvc = new HpsGiftCardService($this->service->servicesConfig());
        if ($this->token != null && ($this->token instanceof HpsTokenData)) {
            if ($this->card == null) {
                $this->card = new HpsGiftCard();
            }
            $this->card->tokenValue = $this->token->tokenValue;
        }
        return $balanceSvc->balance(
            $this->card
        );
    }
1026546
public function performCheck()
    {
        try {
            $serverTimeZone = $this->installerOptions->getServerTimeZone(false);
            $ctz = $this->application->make(Timezone::class, ['connection' => $this->connection]);
            $deltaTimezone = $ctz->getDeltaTimezone($serverTimeZone);
            if ($deltaTimezone !== null) {
                $error = $ctz->describeDeltaTimezone($deltaTimezone);
                $suggestTimezones = $ctz->getCompatibleTimezones();
                if (!empty($suggestTimezones)) {
                    $error .= ' ' . t('These are the time zones compatible with the database one: %s', PunicMisc::join($suggestTimezones));
                }
                $result = new PreconditionResult(PreconditionResult::STATE_FAILED, $error);
            } else {
                $result = new PreconditionResult(PreconditionResult::STATE_PASSED);
            }
        } catch (Exception $x) {
            $result = new PreconditionResult(PreconditionResult::STATE_WARNING, $x->getMessage());
        }

        return $result;
    }
821961
public function balance() 
    {
        $url = self::HOST . self::BALANCE;

        $params = $this->get_default_params();
        $result = $this->request($url, $params);
        $result = explode("\n", $result);

        return array(
            'code' => $result[0],
            'balance' => $result[1]
        );
    }
741635
public function checkResponse()
    {
        if (!isset($this->order_ref)) {
            $this->errorMessage[] = 'CHECK RESPONSE: Missing order_ref variable!';
            return false;
        }
        $this->logFunc("BackRef", $this->getData, $this->order_ref);

        if (!$this->checkCtrl()) {
            $this->errorMessage[] = 'CHECK RESPONSE: INVALID CTRL!';
            return false;
        }

        $ios = new SimpleIos($this->iosConfig, $this->getData['order_currency'], $this->order_ref);

        foreach ($ios->errorMessage as $msg) {
            $this->errorMessage[] = $msg;
        }
        foreach ($ios->debugMessage as $msg) {
            $this->debugMessage[] = $msg;
        }

        if (is_object($ios)) {
            $this->checkIOSStatus($ios);
        }
        $this->logFunc("BackRef_BackStatus", $this->backStatusArray, $this->order_ref);
        if (!$this->checkRtVariable($ios)) {
            return false;
        }
        if (!$this->backStatusArray['RESULT']) {
            return false;
        }
        return true;
    }
642495
public function execute()
    {
        if ($this->order !== null) {
            $path = sprintf('/%s/%s/%s/%s', MoipResource::VERSION, Orders::PATH, $this->order->getId(), self::PATH);
        } else {
            $path = sprintf('/%s/%s/%s/%s', MoipResource::VERSION, Multiorders::PATH, $this->multiorder->getId(), self::MULTI_PAYMENTS_PATH);
        }

        $response = $this->httpRequest($path, Requests::POST, $this);

        return $this->populate($response);
    }
74383
public function performCheck()
    {
        try {
            list($charset, $collation) = $this->characterSetCollationResolver->resolveCharacterSetAndCollation($this->connection);
        } catch (NoCharacterSetCollationDefinedException $x) {
            return new PreconditionResult(PreconditionResult::STATE_SKIPPED, t('preferred database character set and collation are not configured.'));
        } catch (CharacterSetCollationException $x) {
            if ($x instanceof LongKeysUnsupportedByCollation && $x->getCollation() === 'utf8mb4_unicode_ci' && $x->getWantedKeyLength() === 255) {
                // Let's simplify a bit the error message for the default concrete5 values
                // If users customize these values, let's keep the original (complex) message (assuming that they know what they are doing)
                return new PreconditionResult(PreconditionResult::STATE_FAILED,
                    t('The database does have a complete support for all the Unicode characters.')
                    . ' ' . t("This implies, for example, that you may not be able to save emoticons (it's the same behavior as concrete5 versions older than 8.5.0).")
                    . ' ' . t('You should upgrade your database to fix this issue.')
                );
            }

            return new PreconditionResult(PreconditionResult::STATE_FAILED, $x->getMessage());
        } catch (Exception $x) {
            return new PreconditionResult(PreconditionResult::STATE_SKIPPED, $x->getMessage());
        }

        return new PreconditionResult(PreconditionResult::STATE_PASSED, t('The database supports the "%1$s" character set and the "%2$s" collation.', $charset, $collation));
    }
918439
public function validate()
    {
        if ($_SERVER['REQUEST_METHOD'] != 'POST') {
            $this->_logger->log("Invalid request method", Icepay_Api_Logger::ERROR);
            return false;
        };

        $this->_logger->log(sprintf("Postback: %s", serialize($_POST)), Icepay_Api_Logger::TRANSACTION);

        /* @since version 1.0.2 */
        foreach ($this->getPostbackResponseFields() as $obj => $param) {
            $this->data->$obj = (isset($_POST[$param])) ? $_POST[$param] : "";
        }

        if ($this->isVersionCheck())
            return false;

        if (!Icepay_Parameter_Validation::merchantID($this->data->merchant)) {
            $this->_logger->log("Merchant ID is not numeric: {$this->data->merchant}", Icepay_Api_Logger::ERROR);
            return false;
        }

        if (!Icepay_Parameter_Validation::amount($this->data->amount)) {
            $this->_logger->log("Amount is not numeric: {$this->data->amount}", Icepay_Api_Logger::ERROR);
            return false;
        }

        if ($this->_merchantID != $this->data->merchant) {
            $this->_logger->log("Invalid Merchant ID: {$this->data->merchant}", Icepay_Api_Logger::ERROR);
            return false;
        }

        if (!in_array(strtoupper($this->data->status), array(
                    Icepay_StatusCode::OPEN,
                    Icepay_StatusCode::AUTHORIZED,
                    Icepay_StatusCode::SUCCESS,
                    Icepay_StatusCode::ERROR,
                    Icepay_StatusCode::REFUND,
                    Icepay_StatusCode::CHARGEBACK
                ))) {
            $this->_logger->log("Unknown status: {$this->data->status}", Icepay_Api_Logger::ERROR);
            return false;
        }

        if ($this->generateChecksumForPostback() != $this->data->checksum) {
            $this->_logger->log("Checksum does not match", Icepay_Api_Logger::ERROR);
            return false;
        }
        return true;
    }