vbv/server/vbv_lernwelt/shop
Elia Bieri 6c63027834 Rework 2024-09-17 16:41:38 +02:00
..
datatrans Add more logging in app/database 2024-07-04 14:54:22 +02:00
invoice Only upload customer xml file again, when `CheckoutInformation`-instance changed 2024-09-09 16:54:36 +02:00
management/commands VBV-705 feat: cron job abacus export 2024-08-30 16:20:36 +02:00
migrations Rework 2024-09-17 16:41:38 +02:00
tests VBV-705 feat: cron job abacus export 2024-08-30 16:20:36 +02:00
README.md Add fake datatrans endpoints for e2e tests 2024-05-31 16:00:05 +02:00
__init__.py feat: shop app; billing address apis 2023-12-18 15:42:05 +01:00
admin.py VBV-705 feat: cron job abacus export 2024-08-30 16:20:36 +02:00
apps.py feat: shop app; billing address apis 2023-12-18 15:42:05 +01:00
const.py Refactor VV_PRODUCT_NUMBER as const 2024-07-04 14:54:23 +02:00
models.py Rework 2024-09-17 16:41:38 +02:00
serializers.py Add Cypress test for checkout process 2024-07-04 14:54:22 +02:00
services.py Use different templates for invoice and cc 2024-08-12 08:19:10 +02:00
urls.py Remove unused BillingAddress model 2024-05-31 09:54:42 +02:00
views.py Initial implementation 2024-09-11 16:34:10 +02:00

README.md

Setup steps for Production

Shop Product

In the Django shop app, create new products that should be available in the shop:

  • 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 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 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)

For Production:

  1. Coordinate with datatrans to get production account. -> TBD!
  2. Set DATATRANS_BASIC_AUTH_KEY and DATATRANS_HMAC_KEY to the production values (see above).

OAUTH

For Production: Make sure that the following env vars are set:

Azure B2C

  • Set OAUTH_SIGNUP_CLIENT_ID
  • Set OAUTH_SIGNUP_CLIENT_SECRET
  • Set OAUTH_SIGNUP_SERVER_METADATA_URL (.well-known/openid-configuration)
  • Set OAUTH_SIGNUP_TENANT_ID
  • Set OAUTH_SIGNUP_REDIRECT_URI (.../sso/login e.g. https://myvbv-stage.iterativ.ch/sso/login)

Keycloak

  • Set OAUTH_SIGNIN_CLIENT_ID
  • Set OAUTH_SIGNIN_CLIENT_SECRET
  • Set OAUTH_SIGNIN_SERVER_METADATA_URL (.well-known/openid-configuration)
  • Set OAUTH_SIGNIN_REDIRECT_URI (.../sso/callback e.g. https://myvbv-stage.iterativ.ch/sso/callback)

Caprover (VITEx)

  • Set VITE_OAUTH_API_BASE_URL in caprover_deploy.sh for prod environment.
    • OAUTH_SIGNIN_SERVER_METADATA_URL should help to find the correct value.
    • Should be the SSO Prod one from Lernnetz. -> TBD!

send_vv_welcome_email()

  • Due to lack of access to Sendgrid, never tested actually sending the email.

Testing Payment Flow

  • To get user into state for testing (e.g. test-student1@example.com so that he can buy the course):
    • Remove all existing course session users for the user.
    • Remove all existing checkout information for the user.

Cleanup

After everything runs fine, we should be able to remove the following deprecated env vars:

  1. IT_OAUTH_TENANT_ID
  2. IT_OAUTH_CLIENT_NAME
  3. IT_OAUTH_CLIENT_ID
  4. IT_OAUTH_CLIENT_SECRET
  5. IT_OAUTH_API_BASE_URL
  6. IT_OAUTH_LOCAL_REDIRECT_URI
  7. IT_OAUTH_SERVER_METADATA_URL
  8. IT_OAUTH_SCOPE

Datatrans Test Credit Card

5100 0010 0000 0014 06/25 123