diff --git a/env_secrets/caprover_vbv-develop.env b/env_secrets/caprover_vbv-develop.env index c633f417..5432d3c8 100644 Binary files a/env_secrets/caprover_vbv-develop.env and b/env_secrets/caprover_vbv-develop.env differ diff --git a/server/vbv_lernwelt/core/constants.py b/server/vbv_lernwelt/core/constants.py index 75f24848..e36702b8 100644 --- a/server/vbv_lernwelt/core/constants.py +++ b/server/vbv_lernwelt/core/constants.py @@ -28,6 +28,7 @@ TEST_MENTOR1_USER_ID = "d1f5f5a9-5b0a-4e1a-9e1a-9e9b5b5e1b1b" TEST_STUDENT1_VV_USER_ID = "5ff59857-8de5-415e-a387-4449f9a0337a" TEST_STUDENT2_VV_AND_VV_MENTOR_USER_ID = "7e8ebf0b-e6e2-4022-88f4-6e663ba0a9db" TEST_USER_EMPTY_ID = "daecbabe-4ab9-4edf-a71f-4119042ccb02" +TEST_USER_DATATRANS_HANNA_ID = "6bec1a0d-f852-47aa-a4de-072df6e07ad1" TEST_COURSE_SESSION_BERN_ID = -1 TEST_COURSE_SESSION_ZURICH_ID = -2 diff --git a/server/vbv_lernwelt/core/create_default_users.py b/server/vbv_lernwelt/core/create_default_users.py index 17acd036..a384c13e 100644 --- a/server/vbv_lernwelt/core/create_default_users.py +++ b/server/vbv_lernwelt/core/create_default_users.py @@ -20,6 +20,7 @@ from vbv_lernwelt.core.constants import ( TEST_SUPERVISOR1_USER_ID, TEST_TRAINER1_USER_ID, TEST_TRAINER2_USER_ID, + TEST_USER_DATATRANS_HANNA_ID, TEST_USER_EMPTY_ID, ) from vbv_lernwelt.core.models import User @@ -202,6 +203,24 @@ def create_default_users(default_password="test", set_avatar=False): language="de", ) + hanna, _ = User.objects.get_or_create( + id=TEST_USER_DATATRANS_HANNA_ID, + ) + hanna.username = "datatrans.hanna.vbv@example.com" + hanna.email = "datatrans.hanna.vbv@example.com" + hanna.language = "de" + hanna.first_name = "Hanna" + hanna.last_name = "Vbv" + hanna.street = "Bahnstrasse" + hanna.street_number = "2" + hanna.postal_code = "8603" + hanna.city = "Schwerzenbach" + hanna.country_id = "CH" + hanna.birth_date = "1970-01-01" + hanna.phone_number = "+41792018586" + hanna.password = make_password("test") + hanna.save() + for user_data in default_users: _create_student_user(**user_data) diff --git a/server/vbv_lernwelt/shop/services.py b/server/vbv_lernwelt/shop/services.py index f5998d38..a9561d0e 100644 --- a/server/vbv_lernwelt/shop/services.py +++ b/server/vbv_lernwelt/shop/services.py @@ -7,7 +7,6 @@ import structlog from django.conf import settings from vbv_lernwelt.core.admin import User -from vbv_lernwelt.shop.const import VV_PRODUCT_NUMBER from vbv_lernwelt.shop.datatrans.datatrans_api_client import DatatransApiClient from vbv_lernwelt.shop.models import CheckoutState @@ -101,9 +100,8 @@ def init_datatrans_transaction( }, } - # FIXME: test with working cembra byjuno invoice customer? - # if with_cembra_byjuno_invoice: - # payload["paymentMethods"] = ["INT"] + if with_cembra_byjuno_invoice: + payload["paymentMethods"] = ["INT"] if datatrans_customer_data: payload["customer"] = datatrans_customer_data if datatrans_int_data: