public function getTransactionStatus()
    {
        // If the signature check fails, then all bets are off - the POST cannot be trusted.

        if (! $this->isValid()) {
            return static::STATUS_FAILED;
        }

        $status = $this->getStatus();

        if ($status === Response::SAGEPAY_STATUS_OK
            || $status === Response::SAGEPAY_STATUS_OK_REPEATED
            || $status === Response::SAGEPAY_STATUS_AUTHENTICATED
            || $status === Response::SAGEPAY_STATUS_REGISTERED
        ) {
            return static::STATUS_COMPLETED;
        }

        if ($status === Response::SAGEPAY_STATUS_PENDING) {
            return static::STATUS_PENDING;
        }

        return static::STATUS_FAILED;
    }
public function getTransactionStatus()
    {
        // If the signature check fails, then all bets are off - the POST cannot be trusted.

        if (! $this->isValid()) {
            return static::STATUS_FAILED;
        }

        $status = $this->getStatus();

        if ($status === Response::SAGEPAY_STATUS_OK
            || $status === Response::SAGEPAY_STATUS_OK_REPEATED
            || $status === Response::SAGEPAY_STATUS_AUTHENTICATED
            || $status === Response::SAGEPAY_STATUS_REGISTERED
        ) {
            return static::STATUS_COMPLETED;
        }

        if ($status === Response::SAGEPAY_STATUS_PENDING) {
            return static::STATUS_PENDING;
        }

        return static::STATUS_FAILED;
    }
public function getTransactionStatus ( ) { // If the signature check fails, then all bets are off - the POST cannot be trusted. if ( ! $ this -> isValid ( ) ) { return static :: STATUS_FAILED ; } $ status = $ this -> getStatus ( ) ; if ( $ status === Response :: SAGEPAY_STATUS_OK || $ status === Response :: SAGEPAY_STATUS_OK_REPEATED || $ status === Response :: SAGEPAY_STATUS_AUTHENTICATED || $ status === Response :: SAGEPAY_STATUS_REGISTERED ) { return static :: STATUS_COMPLETED ; } if ( $ status === Response :: SAGEPAY_STATUS_PENDING ) { return static :: STATUS_PENDING ; } return static :: STATUS_FAILED ; }
Was the transaction successful?

@return string Transaction status, one of {@see STATUS_COMPLETED}, {@see #STATUS_PENDING},
or {@see #STATUS_FAILED}.
Was the transaction successful?