checkoutSession = $checkoutSession; } /** * @return bool */ public function isValid() { if (!$this->checkoutSession->getLastSuccessQuoteId()) { return false; } if (!$this->checkoutSession->getLastQuoteId() || !$this->checkoutSession->getLastOrderId()) { return false; } return true; } }