Ejemplo n.º 1
0
 /**
  * Create the table for this plugin if it does not yet exist.
  * This functions checks if the called plugin is active one.
  * When yes it is calling the standard method to create the tables
  *
  * @author Valérie Isaksen
  *
  */
 function plgVmOnStoreInstallPaymentPluginTable($jplugin_id)
 {
     if ($res = $this->selectedThisByJPluginId($jplugin_id)) {
         $virtuemart_paymentmethod_id = pbxRequest::getInt('virtuemart_paymentmethod_id');
         $method = $this->getPluginMethod($virtuemart_paymentmethod_id);
         vmdebug('plgVmOnStoreInstallPaymentPluginTable', $method, $virtuemart_paymentmethod_id);
         //$this->createRootFile($method->virtuemart_paymentmethod_id);
         /*
         			$mandatory_fields = array('site_id', 'rang', 'identifiant', 'key');
         			foreach ($mandatory_fields as $mandatory_field) {
         				if (empty($method->$mandatory_field)) {
         					vmError(vmText::sprintf('VMPAYMENT_'.$this->_name.'_CONF_MANDATORY_PARAM', vmText::_('VMPAYMENT_'.$this->_name.'_CONF_' . $mandatory_field)));
         				}
         			}
         */
         if (!extension_loaded('curl')) {
             vmError(vmText::sprintf('VMPAYMENT_' . $this->_name . '_CONF_MANDATORY_PHP_EXTENSION', 'curl'));
         }
         if (!extension_loaded('openssl')) {
             vmError(vmText::sprintf('VMPAYMENT_' . $this->_name . '_CONF_MANDATORY_PHP_EXTENSION', 'openssl'));
         }
     }
     return $this->onStoreInstallPluginTable($jplugin_id);
 }
Ejemplo n.º 2
0
 /**
  *
  */
 function redirectToCart()
 {
     $app = JFactory::getApplication();
     $app->redirect(JRoute::_('index.php?option=com_virtuemart&view=cart&lg=&Itemid=' . pbxRequest::getInt('Itemid'), false), vmText::_('VMPAYMENT_PAYBOX_ERROR_TRY_AGAIN'));
 }