diff --git a/server/config/urls.py b/server/config/urls.py index 39f024f8..ab405ebd 100644 --- a/server/config/urls.py +++ b/server/config/urls.py @@ -10,9 +10,6 @@ from django.views import defaults as default_views from django.views.decorators.csrf import csrf_exempt from django_ratelimit.exceptions import Ratelimited from graphene_django.views import GraphQLView -from wagtail import urls as wagtail_urls -from wagtail.admin import urls as wagtailadmin_urls -from wagtail.documents import urls as wagtaildocs_urls from vbv_lernwelt.api.directory import list_entities from vbv_lernwelt.api.user import me_user_view @@ -59,11 +56,14 @@ from vbv_lernwelt.importer.views import ( ) from vbv_lernwelt.notify.views import email_notification_settings from vbv_lernwelt.shop.views import ( - get_billing_address, - update_billing_address, checkout_vv, + get_billing_address, transaction_webhook, + update_billing_address, ) +from wagtail import urls as wagtail_urls +from wagtail.admin import urls as wagtailadmin_urls +from wagtail.documents import urls as wagtaildocs_urls class SignedIntConverter(IntConverter): diff --git a/server/vbv_lernwelt/shop/migrations/0004_auto_20231116_1336.py b/server/vbv_lernwelt/shop/migrations/0004_auto_20231116_1336.py index c6aecd54..e04553aa 100644 --- a/server/vbv_lernwelt/shop/migrations/0004_auto_20231116_1336.py +++ b/server/vbv_lernwelt/shop/migrations/0004_auto_20231116_1336.py @@ -4,20 +4,19 @@ from django.db import migrations class Migration(migrations.Migration): - dependencies = [ - ('shop', '0003_auto_20231114_2036'), + ("shop", "0003_auto_20231114_2036"), ] operations = [ migrations.RenameField( - model_name='checkoutinformation', - old_name='street_address', - new_name='street', + model_name="checkoutinformation", + old_name="street_address", + new_name="street", ), migrations.RenameField( - model_name='checkoutinformation', - old_name='street_number_address', - new_name='street_number', + model_name="checkoutinformation", + old_name="street_number_address", + new_name="street_number", ), ] diff --git a/server/vbv_lernwelt/shop/migrations/0005_auto_20231116_1338.py b/server/vbv_lernwelt/shop/migrations/0005_auto_20231116_1338.py index 832e85b0..f7955926 100644 --- a/server/vbv_lernwelt/shop/migrations/0005_auto_20231116_1338.py +++ b/server/vbv_lernwelt/shop/migrations/0005_auto_20231116_1338.py @@ -4,20 +4,19 @@ from django.db import migrations class Migration(migrations.Migration): - dependencies = [ - ('shop', '0004_auto_20231116_1336'), + ("shop", "0004_auto_20231116_1336"), ] operations = [ migrations.RenameField( - model_name='checkoutinformation', - old_name='company_street_address', - new_name='company_street', + model_name="checkoutinformation", + old_name="company_street_address", + new_name="company_street", ), migrations.RenameField( - model_name='checkoutinformation', - old_name='company_street_number_address', - new_name='company_street_number', + model_name="checkoutinformation", + old_name="company_street_number_address", + new_name="company_street_number", ), ] diff --git a/server/vbv_lernwelt/shop/migrations/0006_alter_checkoutinformation_state.py b/server/vbv_lernwelt/shop/migrations/0006_alter_checkoutinformation_state.py index b2eeedaf..88d8d2a6 100644 --- a/server/vbv_lernwelt/shop/migrations/0006_alter_checkoutinformation_state.py +++ b/server/vbv_lernwelt/shop/migrations/0006_alter_checkoutinformation_state.py @@ -4,15 +4,23 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('shop', '0005_auto_20231116_1338'), + ("shop", "0005_auto_20231116_1338"), ] operations = [ migrations.AlterField( - model_name='checkoutinformation', - name='state', - field=models.CharField(choices=[('initialized', 'Initialized'), ('settled', 'Settled'), ('transmitted', 'Transmitted'), ('canceled', 'Canceled'), ('failed', 'Failed')], max_length=50), + model_name="checkoutinformation", + name="state", + field=models.CharField( + choices=[ + ("initialized", "Initialized"), + ("settled", "Settled"), + ("transmitted", "Transmitted"), + ("canceled", "Canceled"), + ("failed", "Failed"), + ], + max_length=50, + ), ), ] diff --git a/server/vbv_lernwelt/shop/migrations/0007_checkoutinformation_webhook_history.py b/server/vbv_lernwelt/shop/migrations/0007_checkoutinformation_webhook_history.py index f05498d1..b205cacc 100644 --- a/server/vbv_lernwelt/shop/migrations/0007_checkoutinformation_webhook_history.py +++ b/server/vbv_lernwelt/shop/migrations/0007_checkoutinformation_webhook_history.py @@ -4,15 +4,14 @@ from django.db import migrations, models class Migration(migrations.Migration): - dependencies = [ - ('shop', '0006_alter_checkoutinformation_state'), + ("shop", "0006_alter_checkoutinformation_state"), ] operations = [ migrations.AddField( - model_name='checkoutinformation', - name='webhook_history', + model_name="checkoutinformation", + name="webhook_history", field=models.JSONField(default=list), ), ] diff --git a/server/vbv_lernwelt/shop/services.py b/server/vbv_lernwelt/shop/services.py index 5a32bece..304082bf 100644 --- a/server/vbv_lernwelt/shop/services.py +++ b/server/vbv_lernwelt/shop/services.py @@ -2,7 +2,7 @@ import hashlib import hmac import os import uuid -from abc import abstractmethod, ABC +from abc import ABC, abstractmethod import requests import structlog diff --git a/server/vbv_lernwelt/shop/views.py b/server/vbv_lernwelt/shop/views.py index 1ef6ac05..4706b820 100644 --- a/server/vbv_lernwelt/shop/views.py +++ b/server/vbv_lernwelt/shop/views.py @@ -8,10 +8,10 @@ from rest_framework.response import Response from vbv_lernwelt.shop.models import ( BillingAddress, - Product, CheckoutInformation, - VV_PRODUCT_SKU, CheckoutState, + Product, + VV_PRODUCT_SKU, ) from vbv_lernwelt.shop.serializers import BillingAddressSerializer from vbv_lernwelt.shop.services import DataTransPaymentProvider