Exemplo n.º 1
0
 def _process(self):
     if self.registration.state != RegistrationState.unpaid:
         flash(_("The registration doesn't need to be paid"), 'error')
         return redirect(url_for('event_registration.display_regform', self.registration.locator.registrant))
     plugins = get_active_payment_plugins(self.event)
     valid_plugins = {k: v for k, v in plugins.iteritems() if v.supports_currency(self.registration.currency)}
     force_plugin = valid_plugins.items()[0] if len(valid_plugins) == 1 else None  # only one plugin available
     return WPPaymentEvent.render_template('event_checkout.html', self.event,
                                           registration=self.registration,
                                           regform=self.registration.registration_form,
                                           plugins=valid_plugins.items(), force_plugin=force_plugin)
Exemplo n.º 2
0
 def _process(self):
     if self.registration.state != RegistrationState.unpaid:
         flash(_("The registration doesn't need to be paid"), 'error')
         return redirect(url_for('event_registration.display_regform', self.registration.locator.registrant))
     plugins = get_active_payment_plugins(self.event_new)
     valid_plugins = {k: v for k, v in plugins.iteritems() if v.supports_currency(self.registration.currency)}
     force_plugin = valid_plugins.items()[0] if len(valid_plugins) == 1 else None  # only one plugin available
     return WPPaymentEvent.render_template('event_checkout.html', self._conf, event=self.event_new,
                                           registration=self.registration,
                                           regform=self.registration.registration_form,
                                           plugins=valid_plugins.items(), force_plugin=force_plugin)
Exemplo n.º 3
0
 def _process(self):
     conditions = event_settings.get(self.event_new, "conditions")
     return WPPaymentEvent.render_template("terms_and_conditions.html", self._conf, conditions=conditions)
Exemplo n.º 4
0
 def _process(self):
     conditions = payment_event_settings.get(self.event, 'conditions')
     return WPPaymentEvent.render_template('terms_and_conditions.html',
                                           self._conf,
                                           conditions=conditions)
Exemplo n.º 5
0
 def _process(self):
     conditions = event_settings.get(self._conf, 'conditions')
     return WPPaymentEvent.render_template('terms_and_conditions.html', self._conf, conditions=conditions)