/** * Check whether order review has enough data to initialize * * @param string|null $token * @return void * @throws \Magento\Framework\Model\Exception */ public function prepareOrderReview($token = null) { $payment = $this->_quote->getPayment(); if (!$payment || !$payment->getAdditionalInformation(self::PAYMENT_INFO_TRANSPORT_PAYER_ID)) { throw new \Magento\Framework\Model\Exception(__('Payer is not identified.')); } $this->_quote->setMayEditShippingAddress(1 != $this->_quote->getPayment()->getAdditionalInformation(self::PAYMENT_INFO_TRANSPORT_SHIPPING_OVERRIDDEN)); $this->_quote->setMayEditShippingMethod('' == $this->_quote->getPayment()->getAdditionalInformation(self::PAYMENT_INFO_TRANSPORT_SHIPPING_METHOD)); $this->_ignoreAddressValidation(); $this->_quote->collectTotals()->save(); }