KJ\Magento\Command\Order\Create\DummyCommand::setupPaymentMethod PHP Method

setupPaymentMethod() protected method

protected setupPaymentMethod ( )
    protected function setupPaymentMethod()
    {
        $quotePayment = $this->getQuote()->getPayment();
        if ($paymentInput = $this->_input->getOption('payment')) {
            $quotePayment->setMethod($paymentInput);
            if ($ccTokenInput = $this->_input->getOption('cc_token')) {
                \Mage::app()->getRequest()->setPost('payment', array('method' => $paymentInput, 'cc_token' => $ccTokenInput));
            }
        } else {
            $quotePayment->setMethod('checkmo');
        }
        $this->getQuote()->setPayment($quotePayment);
        return $this;
    }