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.");
 }
Пример #2
0
 /**
  * The resource link is the connection link to the database.
  *
  * @param resource $resourceLink        	
  */
 public function __construct($resourceLink)
 {
     Customweb_Core_Assert::notNull($resourceLink);
     $this->link = $resourceLink;
 }