From a41184d83d23d8344060c881c282e452d7407653 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timoth=C3=A9e=20Floure?= Date: Thu, 5 Mar 2020 11:27:43 +0100 Subject: [PATCH] Fix generate-bills, remove debug print in charge method --- uncloud/uncloud_pay/management/commands/generate-bills.py | 5 +---- uncloud/uncloud_pay/models.py | 1 - 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/uncloud/uncloud_pay/management/commands/generate-bills.py b/uncloud/uncloud_pay/management/commands/generate-bills.py index a7dbe78..5bd4519 100644 --- a/uncloud/uncloud_pay/management/commands/generate-bills.py +++ b/uncloud/uncloud_pay/management/commands/generate-bills.py @@ -9,8 +9,6 @@ from datetime import timedelta, date from django.utils import timezone from uncloud_pay.models import Bill -BILL_PAYMENT_DELAY=timedelta(days=10) - logger = logging.getLogger(__name__) class Command(BaseCommand): @@ -31,8 +29,7 @@ class Command(BaseCommand): Bill.generate_for( year=now.year, month=now.month, - user=user, - allowed_delay=BILL_PAYMENT_DELAY) + user=user) # We're done for this round :-) print("=> Done.") diff --git a/uncloud/uncloud_pay/models.py b/uncloud/uncloud_pay/models.py index 0ac4107..ac91034 100644 --- a/uncloud/uncloud_pay/models.py +++ b/uncloud/uncloud_pay/models.py @@ -149,7 +149,6 @@ class PaymentMethod(models.Model): stripe_customer = StripeCustomer.objects.get(owner=self.owner).stripe_id stripe_payment = uncloud_pay.stripe.charge_customer( amount, stripe_customer, self.stripe_payment_method_id) - print(stripe_payment) if 'paid' in stripe_payment and stripe_payment['paid'] == False: raise Exception(stripe_payment['error']) else: