public function indexAction()
 {
     $container = Mage::helper('SaferpayCw')->createContainer();
     $packages = array(0 => 'Customweb_Saferpay', 1 => 'Customweb_Payment_Authorization');
     $adapter = Mage::getModel('saferpaycw/endpointAdapter');
     $dispatcher = new Customweb_Payment_Endpoint_Dispatcher($adapter, $container, $packages);
     $response = $dispatcher->dispatch(Customweb_Core_Http_ContextRequest::getInstance());
     $wrapper = new Customweb_Core_Http_Response($response);
     $wrapper->send();
     die;
 }
Beispiel #2
0
 /**
  * @return Customweb_DependencyInjection_Container_Default
  */
 public function createContainer()
 {
     if (self::$container === null) {
         if (!function_exists('cw_class_loader')) {
             function cw_class_loader($className)
             {
                 return Varien_Autoload::instance()->autoload($className);
             }
             Customweb_Core_Util_Class::registerClassLoader('cw_class_loader');
         }
         $packages = array(0 => 'Customweb_Saferpay', 1 => 'Customweb_Payment_Authorization');
         $packages[] = 'Customweb_SaferpayCw_Model_';
         $packages[] = 'Customweb_Mvc_Template_Php_Renderer';
         $packages[] = 'Customweb_Payment_SettingHandler';
         $provider = new Customweb_DependencyInjection_Bean_Provider_Editable(new Customweb_DependencyInjection_Bean_Provider_Annotation($packages));
         $provider->addObject(Customweb_Core_Http_ContextRequest::getInstance())->addObject($this->getAssetResolver());
         self::$container = new Customweb_DependencyInjection_Container_Default($provider);
     }
     return self::$container;
 }
Beispiel #3
0
 /**
  * Returns the IP address of the client connected to the
  * server. In case a proxy is used the method tries to find
  * the correct IP address.
  * 
  * @throws Exception
  * @deprecated Use instead always the provided request object
  * @return string
  */
 public static function getClientIPAddress()
 {
     return Customweb_Core_Http_ContextRequest::getClientIPAddress();
 }
 public function getHost()
 {
     if (self::$host === null) {
         self::$host = self::getRequestHost();
     }
     return self::$host;
 }
 /**
  * Returns the HTTP request.
  * 
  * @return Customweb_Core_Http_ContextRequest
  */
 public function getHttpRequest()
 {
     if ($this->hasBean('Customweb_Core_Http_IRequest')) {
         return $this->getBean('Customweb_Core_Http_IRequest');
     } else {
         return Customweb_Core_Http_ContextRequest::getInstance();
     }
 }