Added Flake8 lib and fixed PEP8 violations
This commit is contained in:
parent
0cbd3aa666
commit
edcfd3e9f4
65 changed files with 340 additions and 387 deletions
|
|
@ -3,6 +3,7 @@ from django.conf import settings
|
|||
import stripe
|
||||
stripe.api_key = settings.STRIPE_API_PRIVATE_KEY
|
||||
|
||||
|
||||
class Command(BaseCommand):
|
||||
help = "Record payment plans for Digital Glarus on stripe"
|
||||
|
||||
|
|
@ -10,5 +11,3 @@ class Command(BaseCommand):
|
|||
print("Available plans:")
|
||||
for plan in stripe.Plan.all():
|
||||
print(plan)
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -11,11 +11,11 @@ PAYMENT_PLANS = [
|
|||
'id': "spontaneus"
|
||||
}),
|
||||
('committed', {
|
||||
'amount':36000,
|
||||
'interval':'year',
|
||||
'name':'The Committed',
|
||||
'currency':'chf',
|
||||
'id':'committed'
|
||||
'amount': 36000,
|
||||
'interval': 'year',
|
||||
'name': 'The Committed',
|
||||
'currency': 'chf',
|
||||
'id': 'committed'
|
||||
})
|
||||
]
|
||||
|
||||
|
|
@ -26,8 +26,6 @@ class Command(BaseCommand):
|
|||
def handle(self, *args, **options):
|
||||
for payment_plan, data in PAYMENT_PLANS:
|
||||
try:
|
||||
res = stripe.Plan.create(**data)
|
||||
stripe.Plan.create(**data)
|
||||
except stripe.InvalidRequestError as e:
|
||||
print(e)
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue