public function setProcessorType($processorType)
    {
        if (!in_array($processorType, static::$allowedProcessorTypes))
        {
            throw new RuntimeException("Unknown transaction processor type given: {$processorType}");
        }

        if (!empty($this->processorType))
        {
            throw new RuntimeException('You can set payment transaction processor type only once');
        }

        $this->processorType = $processorType;

        return $this;
    }
public function setProcessorType($processorType)
    {
        if (!in_array($processorType, static::$allowedProcessorTypes))
        {
            throw new RuntimeException("Unknown transaction processor type given: {$processorType}");
        }

        if (!empty($this->processorType))
        {
            throw new RuntimeException('You can set payment transaction processor type only once');
        }

        $this->processorType = $processorType;

        return $this;
    }
public function setProcessorType ( $ processorType ) { if ( ! in_array ( $ processorType , static :: $ allowedProcessorTypes ) ) { throw new RuntimeException ( "Unknown transaction processor type given: {$processorType}" ) ; } if ( ! empty ( $ this -> processorType ) ) { throw new RuntimeException ( 'You can set payment transaction processor type only once' ) ; } $ this -> processorType = $ processorType ; return $ this ; }
Set payment transaction processor type

@param       string      $processorType      Processor type

@return      self

@throws      RuntimeException                Unknown processor type given
@throws      RuntimeException                Processor type already specified
Set payment transaction processor type