Add "is_implicit" attribute to payment providers

This commit is contained in:
Raphael Michel
2018-02-04 23:14:18 +01:00
parent 4ccf33af03
commit da32621c55
2 changed files with 21 additions and 3 deletions

View File

@@ -487,9 +487,13 @@ class PaymentStep(QuestionsViewMixin, CartMixin, TemplateFlowStep):
def is_applicable(self, request):
self.request = request
if self._total_order_value == 0:
self.cart_session['payment'] = 'free'
return False
for p in self.request.event.get_payment_providers().values():
if p.is_implicit:
if p.is_allowed(request):
self.cart_session['payment'] = p.identifier
return False
return True