src/Transaction/Transaction.php
public function setStatus($status)
    {
        if ($this->isValidStatus($status)) {
            $this->status = $status;
            $this->saveState();
        } else {
            throw new \InvalidArgumentException(
                sprintf("Status '%s' is not a valid status", $status)
            );
        }
    }
public function setStatus($status)
    {
        if ($this->isValidStatus($status)) {
            $this->status = $status;
            $this->saveState();
        } else {
            throw new \InvalidArgumentException(
                sprintf("Status '%s' is not a valid status", $status)
            );
        }
    }
public function setStatus ( $ status ) { if ( $ this -> isValidStatus ( $ status ) ) { $ this -> status = $ status ; $ this -> saveState ( ) ; } else { throw new \ InvalidArgumentException ( sprintf ( "Status '%s' is not a valid status" , $ status ) ) ; } }
Sets the status of the transaction
@param string $status the status of the transaction
@throws \InvalidArgumentException
@return void
Sets the status of the transaction