Restrict Payment Providers to Sales Channels (#1481)

* Allow to restrict payment providers to specific sales channels

* Fix test

* Add `payment_restrictions_supported`-property to SalesChannels
This commit is contained in:
Martin Gross
2019-11-12 17:11:43 +01:00
committed by Raphael Michel
parent 384e7f8fc1
commit 6896682dd1
8 changed files with 51 additions and 9 deletions

View File

@@ -42,6 +42,17 @@ class SalesChannel:
"""
return True
@property
def payment_restrictions_supported(self) -> bool:
"""
If this property is ``True``, organizers can restrict the usage of payment providers to this sales channel.
Example: pretixPOS provides its own sales channel, ignores the configured payment providers completely and
handles payments locally. Therefor, this property should be set to ``False`` for the pretixPOS sales channel as
the event organizer cannot restrict the usage of any payment provider through the backend.
"""
return True
def get_all_sales_channels():
global _ALL_CHANNELS