protected function checkContextCompleteness(Customweb_Payment_ExternalCheckout_IContext $context) { Customweb_Core_Assert::notNull($context->getBillingAddress(), "The context must contain a billing address, before it can be COMPLETED."); Customweb_Core_Assert::notNull($context->getShippingAddress(), "The context must contain a shipping address, before it can be COMPLETED. You may use the billing address when no shipping address is present."); Customweb_Core_Assert::hasLength($context->getShippingMethodName(), "The context must contain a shipping method name, before it can be COMPLETED."); Customweb_Core_Assert::notNull($context->getBillingAddress(), "The context must contain a billing address, before it can be COMPLETED."); Customweb_Core_Assert::hasSize($context->getInvoiceItems(), "At least one line item must be added before it can be COMPLETED."); Customweb_Core_Assert::hasLength($context->getCustomerEmailAddress(), "The context must contain an e-mail address before it can be COMPLETED."); }