From be3100ee4648bb76963b0b6f78b27fbc15120706 Mon Sep 17 00:00:00 2001 From: Christian Cueni Date: Thu, 14 Dec 2023 13:57:42 +0100 Subject: [PATCH] Update price, fix uk page --- client/src/pages/start/UKStartPage.vue | 15 ++++++--------- server/vbv_lernwelt/shop/README.md | 6 +++--- .../vbv_lernwelt/shop/tests/test_checkout_api.py | 4 ++-- .../shop/tests/test_datatrans_service.py | 6 +++--- .../shop/tests/test_datatrans_webhook.py | 4 ++-- 5 files changed, 16 insertions(+), 19 deletions(-) diff --git a/client/src/pages/start/UKStartPage.vue b/client/src/pages/start/UKStartPage.vue index 79c65ea9..6a2b6d9f 100644 --- a/client/src/pages/start/UKStartPage.vue +++ b/client/src/pages/start/UKStartPage.vue @@ -55,15 +55,12 @@ const { t } = useTranslation();
-

{{ $t("Sprache wählen und Lehrgang starten") }}:

-
- - {{ $t("a.Jetzt mit Lehrgang starten") }} - -
+ + {{ $t("a.Jetzt mit Lehrgang starten") }} +
diff --git a/server/vbv_lernwelt/shop/README.md b/server/vbv_lernwelt/shop/README.md index 439869ae..008a056b 100644 --- a/server/vbv_lernwelt/shop/README.md +++ b/server/vbv_lernwelt/shop/README.md @@ -4,11 +4,11 @@ In the Django shop app, create new products that should be available in the shop: -- `vv-de` Price 30000 (300_00 -> 300.00 CHF), name & description can be anything. +- `vv-de` Price 32430 (324_3- -> 324.30 CHF), base 300 CHF + 8.1% MWSt., name & description can be anything. - ONLY if `COURSE_VERSICHERUNGSVERMITTLERIN_ID` exists! -- `vv-fr` Price 30000 (300_00 -> 300.00 CHF), name & description can be anything. +- `vv-fr` Price 32430 (324_3- -> 324.30 CHF), base 300 CHF + 8.1% MWSt., name & description can be anything. - ONLY if `COURSE_VERSICHERUNGSVERMITTLERIN_ID_FR` exists! -- `vv-it` Price 30000 (300_00 -> 300.00 CHF), name & description can be anything. +- `vv-it` Price 32430 (324_3- -> 324.30 CHF), base 300 CHF + 8.1% MWSt., name & description can be anything. - ONLY if `COURSE_VERSICHERUNGSVERMITTLERIN_ID_IT` exists! ## Datatrans (Payment Provider) diff --git a/server/vbv_lernwelt/shop/tests/test_checkout_api.py b/server/vbv_lernwelt/shop/tests/test_checkout_api.py index a650008d..bd7e942b 100644 --- a/server/vbv_lernwelt/shop/tests/test_checkout_api.py +++ b/server/vbv_lernwelt/shop/tests/test_checkout_api.py @@ -36,7 +36,7 @@ class CheckoutAPITestCase(APITestCase): def setUp(self) -> None: Product.objects.create( sku=VV_DE_PRODUCT_SKU, - price=300_00, + price=324_30, description="VV", name="VV", ) @@ -83,7 +83,7 @@ class CheckoutAPITestCase(APITestCase): mock_init_transaction.assert_called_once_with( user=self.user, - amount_chf_centimes=300_00, + amount_chf_centimes=324_30, redirect_url_success=f"{REDIRECT_URL}/onboarding/{VV_DE_PRODUCT_SKU}/checkout/complete", redirect_url_error=f"{REDIRECT_URL}/onboarding/{VV_DE_PRODUCT_SKU}/checkout/address?error", redirect_url_cancel=f"{REDIRECT_URL}/", diff --git a/server/vbv_lernwelt/shop/tests/test_datatrans_service.py b/server/vbv_lernwelt/shop/tests/test_datatrans_service.py index d6802609..f4a54039 100644 --- a/server/vbv_lernwelt/shop/tests/test_datatrans_service.py +++ b/server/vbv_lernwelt/shop/tests/test_datatrans_service.py @@ -38,7 +38,7 @@ class DatatransServiceTest(TestCase): # WHEN transaction_id = init_transaction( user=self.user, - amount_chf_centimes=300_00, + amount_chf_centimes=324_30, redirect_url_success=f"{REDIRECT_URL}/success", redirect_url_error=f"{REDIRECT_URL}/error", redirect_url_cancel=f"{REDIRECT_URL}/cancel", @@ -52,7 +52,7 @@ class DatatransServiceTest(TestCase): url="https://api.sandbox.datatrans.com/v1/transactions", json={ "autoSettle": True, - "amount": 300_00, + "amount": 324_30, "currency": "CHF", "language": self.user.language, "refno": str(mock_uuid()), @@ -78,7 +78,7 @@ class DatatransServiceTest(TestCase): with self.assertRaises(InitTransactionException): init_transaction( user=self.user, - amount_chf_centimes=300_00, + amount_chf_centimes=324_30, redirect_url_success=f"/success", redirect_url_error=f"/error", redirect_url_cancel=f"/cancel", diff --git a/server/vbv_lernwelt/shop/tests/test_datatrans_webhook.py b/server/vbv_lernwelt/shop/tests/test_datatrans_webhook.py index 67abcc82..b594d95e 100644 --- a/server/vbv_lernwelt/shop/tests/test_datatrans_webhook.py +++ b/server/vbv_lernwelt/shop/tests/test_datatrans_webhook.py @@ -22,7 +22,7 @@ def create_checkout_information( user=user, transaction_id=transaction_id, product_sku=VV_DE_PRODUCT_SKU, - product_price=300_00, + product_price=324_30, state=state.value, ) @@ -46,7 +46,7 @@ class DatatransWebhookTestCase(APITestCase): self.product = Product.objects.create( sku=VV_DE_PRODUCT_SKU, - price=300_00, + price=324_30, description="VV", name="VV", )