django-orchestra/orchestra/apps/payments/actions.py

6 lines
261 B
Python
Raw Normal View History

from .methods import PaymentMethod
def process_transactions(modeladmin, request, queryset):
for method, transactions in queryset.group_by('source__method'):
if method is not None:
PaymentMethod.get_plugin(method)().process(transactions)