Beispiel #1
0
 def loadPlugins(self, initSorted=True):
     self.payMods = {}
     epaymentModules = PluginLoader.getPluginsByType("EPayment")
     for mod in epaymentModules:
         self.payMods[mod.__name__] = mod.epayment.getPayMod()
     self._p_changed = 1
     if initSorted:
         self.initSortedModPay()
Beispiel #2
0
 def loadPlugins(self, initSorted=True):
     self.payMods = {}
     epaymentModules = PluginLoader.getPluginsByType("EPayment")
     for mod in epaymentModules:
         self.payMods[mod.__name__] = mod.epayment.getPayMod()
     self._p_changed = 1
     if initSorted:
         self.initSortedModPay()
Beispiel #3
0
 def process(self, params):
     from MaKaC.plugins import PluginLoader
     epaymentModules = PluginLoader.getPluginsByType("EPayment")
     module = None
     for mod in epaymentModules:
         params2 = copy(params)
         if mod.webinterface.rh.preprocessParams(params2) and \
                mod.MODULE_ID == params2.get("EPaymentName","No module name"):
             module = mod
             break
     if module:
         rhmod = module.webinterface.rh
         rhmod.preprocessParams(params)
         requestTag = params.get("requestTag", "No requestTag")
         rh = rhmod.getRHByTag(rhmod, requestTag)
         if rh:
             return rh(self._req).process(params)
     return ""
Beispiel #4
0
 def process(self, params):
     from MaKaC.plugins import PluginLoader
     epaymentModules = PluginLoader.getPluginsByType("EPayment")
     module = None
     for mod in epaymentModules:
         params2 = copy(params)
         if mod.webinterface.rh.preprocessParams(params2) and \
                mod.MODULE_ID == params2.get("EPaymentName","No module name"):
             module = mod
             break
     if module:
         rhmod = module.webinterface.rh
         rhmod.preprocessParams(params)
         requestTag = params.get("requestTag", "No requestTag")
         rh = rhmod.getRHByTag(rhmod, requestTag)
         if rh:
             return rh(self._req).process(params)
     return ""
Beispiel #5
0
    def process(self, params):
        from MaKaC.plugins import PluginLoader
        epaymentModules = PluginLoader.getPluginsByType("EPayment")
        module = None
        for mod in epaymentModules:
            if mod.MODULE_ID == params.get("EPaymentName","No module name"):
                module = mod
                break

        if module:
            try:
                rhmod = module.webinterface.rh
            except:
                raise MaKaCError("%s"%module)
            requestTag = params.get("requestTag", "No requestTag")
            rh = rhmod.getRHByTag(rhmod, requestTag)
            if rh:
                return rh(self._req).process(params)
            return "Request handler not found"
        return "Module not found"
Beispiel #6
0
    def process(self, params):
        from MaKaC.plugins import PluginLoader
        epaymentModules = PluginLoader.getPluginsByType("EPayment")
        module = None
        for mod in epaymentModules:
            if mod.MODULE_ID == params.get("EPaymentName", "No module name"):
                module = mod
                break

        if module:
            try:
                rhmod = module.webinterface.rh
            except:
                raise MaKaCError("%s" % module)
            requestTag = params.get("requestTag", "No requestTag")
            rh = rhmod.getRHByTag(rhmod, requestTag)
            if rh:
                return rh(self._req).process(params)
            return "Request handler not found"
        return "Module not found"
Beispiel #7
0
    def updatePlugins(self, initSorted=True):
        epaymentModules = PluginLoader.getPluginsByType("EPayment")
        changed = False
        for mod in epaymentModules:
            name = mod.MODULE_ID
            if name not in self.payMods:
                self.payMods[name] = mod.epayment.getPayMod()
                changed = True
            else:
                # this seems to be some kind of replacement mechanism
                # no idea of its use though...
                if not isinstance(self.payMods[name],
                                  mod.epayment.getPayModClass()):
                    newMod = mod.epayment.getPayMod()
                    self.payMods[mod.MODULE_ID] = newMod
                    changed = True

        if changed:
            self._p_changed = 1
        if initSorted:
            self.initSortedModPay()
Beispiel #8
0
    def updatePlugins(self, initSorted=True):
        epaymentModules = PluginLoader.getPluginsByType("EPayment")
        changed = False
        for mod in epaymentModules:
            name = mod.MODULE_ID
            if name not in self.payMods:
                self.payMods[name] = mod.epayment.getPayMod()
                changed = True
            else:
                # this seems to be some kind of replacement mechanism
                # no idea of its use though...
                if not isinstance(self.payMods[name],
                                  mod.epayment.getPayModClass()):
                    newMod = mod.epayment.getPayMod()
                    self.payMods[mod.MODULE_ID] = newMod
                    changed = True

        if changed:
            self._p_changed = 1
        if initSorted:
            self.initSortedModPay()
Beispiel #9
0
 def getAvailablePlugins():
     mods = PluginLoader.getPluginsByType("RoomBooking")
     return mods
Beispiel #10
0
 def getAvailablePlugins():
     mods = PluginLoader.getPluginsByType("RoomBooking")
     return mods