1 # This file is part of Wolne Lektury, licensed under GNU Affero GPLv3 or later.
2 # Copyright © Fundacja Wolne Lektury. See NOTICE for more information.
5 from django.core.management.base import BaseCommand
6 from club.models import PayUOrder
9 class Command(BaseCommand):
10 def add_arguments(self, parser):
11 parser.add_argument('--rejected', '-r', type=bool, default=False)
12 parser.add_argument('order_id', type=int)
14 def handle(self, **options):
15 order = PayUOrder.objects.get(id=options['order_id'])
16 status = 'REJECTED' if options['rejected'] else 'COMPLETED'
17 notification = order.notification_set.create(