diff --git a/.env-dist b/.env-dist index 952989b85d..6f04759fa6 100644 --- a/.env-dist +++ b/.env-dist @@ -36,8 +36,8 @@ TWILIO_AUTH_TOKEN= TWILIO_SMS_APPLICATION_SID= TWILIO_MAIN_NUMBER= PREMIUM_PROD_ID=prod_K29ULZL9pUR9Fr -PERIODICAL_PREMIUM_PROD_ID=price_1LXUenJNcmPzuWtRw3rhjQNP -PHONE_PROD_ID=prod_LgQiSgNi4xL7dq +PERIODICAL_PREMIUM_PROD_ID=prod_KGizMiBqUJdYoY +PHONE_PROD_ID=prod_KGizMiBqUJdYoY BUNDLE_PROD_ID=prod_MIex7Q079igFZJ SUBSCRIPTIONS_WITH_UNLIMITED="monitor-unlimited,mozilla-one,guardian_vpn,premium-relay" SUBSCRIPTIONS_WITH_PHONE="relay-phones," diff --git a/privaterelay/settings.py b/privaterelay/settings.py index 376bfa8d0e..330c19e6e8 100644 --- a/privaterelay/settings.py +++ b/privaterelay/settings.py @@ -313,8 +313,23 @@ def _get_initial_middleware() -> list[str]: MAX_NUM_FREE_ALIASES = config("MAX_NUM_FREE_ALIASES", 5, cast=int) PREMIUM_PROD_ID = config("PREMIUM_PROD_ID", "", cast=str) PERIODICAL_PREMIUM_PROD_ID = config("PERIODICAL_PREMIUM_PROD_ID", "", cast=str) +PREMIUM_PLAN_ID_US_MONTHLY = config( + "PREMIUM_PLAN_ID_US_MONTHLY", "price_1LXUcnJNcmPzuWtRpbNOajYS", cast=str +) +PREMIUM_PLAN_ID_US_YEARLY = config( + "PREMIUM_PLAN_ID_US_YEARLY", "price_1LXUdlJNcmPzuWtRKTYg7mpZ", cast=str +) PHONE_PROD_ID = config("PHONE_PROD_ID", "", cast=str) +PHONE_PLAN_ID_US_MONTHLY = config( + "PHONE_PLAN_ID_US_MONTHLY", "price_1Li0w8JNcmPzuWtR2rGU80P3", cast=str +) +PHONE_PLAN_ID_US_YEARLY = config( + "PHONE_PLAN_ID_US_YEARLY", "price_1Li15WJNcmPzuWtRIh0F4VwP", cast=str +) BUNDLE_PROD_ID = config("BUNDLE_PROD_ID", "", cast=str) +BUNDLE_PLAN_ID_US = config( + "BUNDLE_PLAN_ID_US", "price_1La3d7JNcmPzuWtRn0cg2EyH", cast=str +) PREMIUM_PRICE_ID_OVERRIDE = config("PREMIUM_PRICE_ID_OVERRIDE", "", cast=str) PREMIUM_PLAN_ID_MATRIX = { "chf": { @@ -447,155 +462,144 @@ def _get_initial_middleware() -> list[str]: "de": { "monthly": { "id": "price_1LYCqOJNcmPzuWtRuIXpQRxi", - "price": "CHF ?.??", + "price": "CHF 2.00", }, "yearly": { "id": "price_1LYCqyJNcmPzuWtR3Um5qDPu", - "price": "CHF ?.??", + "price": "CHF 1.00", }, }, "fr": { "monthly": { "id": "price_1LYCvpJNcmPzuWtRq9ci2gXi", - "price": "CHF ?.??", + "price": "CHF 2.00", }, "yearly": { "id": "price_1LYCwMJNcmPzuWtRm6ebmq2N", - "price": "CHF ?.??", + "price": "CHF 1.00", }, }, "it": { "monthly": { "id": "price_1LYCiBJNcmPzuWtRxtI8D5Uy", - "price": "CHF ?.??", + "price": "CHF 2.00", }, "yearly": { "id": "price_1LYClxJNcmPzuWtRWjslDdkG", - "price": "CHF ?.??", + "price": "CHF 1.00", }, }, }, "euro": { - # TODO: Get plan ID for Austria - # "at": { - # "monthly": { - # "id": "", - # "price": "?.?? €", - # }, - # "yearly": { - # "id": "", - # "price": "?.?? €", - # }, - # }, "de": { "monthly": { "id": "price_1LYC79JNcmPzuWtRU7Q238yL", - "price": "?.?? €", + "price": "1,99 €", }, "yearly": { "id": "price_1LYC7xJNcmPzuWtRcdKXCVZp", - "price": "?.?? €", + "price": "0,99 €", }, }, "es": { "monthly": { "id": "price_1LYCWmJNcmPzuWtRtopZog9E", - "price": "?.?? €", + "price": "1,99 €", }, "yearly": { "id": "price_1LYCXNJNcmPzuWtRu586XOFf", - "price": "?.?? €", + "price": "0,99 €", }, }, "fr": { "monthly": { "id": "price_1LYBuLJNcmPzuWtRn58XQcky", - "price": "?.?? €", + "price": "1,99 €", }, "yearly": { "id": "price_1LYBwcJNcmPzuWtRpgoWcb03", - "price": "?.?? €", + "price": "0,99 €", }, }, "it": { "monthly": { "id": "price_1LYCMrJNcmPzuWtRTP9vD8wY", - "price": "?.?? €", + "price": "1,99 €", }, "yearly": { "id": "price_1LYCN2JNcmPzuWtRtWz7yMno", - "price": "?.?? €", + "price": "0,99 €", }, }, "nl": { "monthly": { "id": "price_1LYCdLJNcmPzuWtR0J1EHoJ0", - "price": "?.?? €", + "price": "1,99 €", }, "yearly": { "id": "price_1LYCdtJNcmPzuWtRVm4jLzq2", - "price": "?.?? €", + "price": "0,99 €", + }, + }, + "ie": { + "monthly": { + "id": "price_1LhdrkJNcmPzuWtRvCc4hsI2", + "price": "1,99 €", + }, + "yearly": { + "id": "price_1LhdprJNcmPzuWtR7HqzkXTS", + "price": "0,99 €", }, }, - # TODO: Get plan ID for Ireland - # "ie": { - # "monthly": { - # "id": "", - # "price": "?.?? €", - # }, - # "yearly": { - # "id": "", - # "price": "?.?? €", - # }, - # }, "sv": { "monthly": { "id": "price_1LYBblJNcmPzuWtRGRHIoYZ5", - "price": "?.?? €", + "price": "1,99 €", }, "yearly": { "id": "price_1LYBeMJNcmPzuWtRT5A931WH", - "price": "?.?? €", + "price": "0,99 €", }, }, "fi": { "monthly": { "id": "price_1LYBn9JNcmPzuWtRI3nvHgMi", - "price": "?.?? €", + "price": "1,99 €", }, "yearly": { "id": "price_1LYBq1JNcmPzuWtRmyEa08Wv", - "price": "?.?? €", + "price": "0,99 €", }, }, }, "usd": { "en": { "monthly": { - "id": "price_1LXUcnJNcmPzuWtRpbNOajYS", - "price": "$?.??", + "id": PREMIUM_PLAN_ID_US_MONTHLY, + "price": "$1.99", }, "yearly": { - "id": "price_1LXUdlJNcmPzuWtRKTYg7mpZ", - "price": "$?.??", + "id": PREMIUM_PLAN_ID_US_YEARLY, + "price": "$0.99", }, }, "gb": { "monthly": { "id": "price_1LYCHpJNcmPzuWtRhrhSYOKB", - "price": "$?.??", + "price": "$1.99", }, "yearly": { "id": "price_1LYCIlJNcmPzuWtRQtYLA92j", - "price": "$?.??", + "price": "$0.99", }, }, }, } PERIODICAL_PREMIUM_PLAN_COUNTRY_LANG_MAPPING = { # Austria - # Commented out; no plan ID known yet - # "at": {"de": PERIODICAL_PREMIUM_PLAN_ID_MATRIX["euro"]["at"]}, + "at": { + "de": PERIODICAL_PREMIUM_PLAN_ID_MATRIX["euro"]["de"], + }, # Belgium "be": { "fr": PERIODICAL_PREMIUM_PLAN_ID_MATRIX["euro"]["fr"], @@ -621,10 +625,9 @@ def _get_initial_middleware() -> list[str]: "fr": PERIODICAL_PREMIUM_PLAN_ID_MATRIX["euro"]["fr"], }, # Ireland - # Commented out; no plan ID known yet - # "ie": { - # "en": PERIODICAL_PREMIUM_PLAN_ID_MATRIX["euro"]["ie"], - # }, + "ie": { + "en": PERIODICAL_PREMIUM_PLAN_ID_MATRIX["euro"]["ie"], + }, # Italy "it": { "it": PERIODICAL_PREMIUM_PLAN_ID_MATRIX["euro"]["it"], @@ -665,62 +668,44 @@ def _get_initial_middleware() -> list[str]: "usd": { "en": { "monthly": { - "id": "price_1LXUenJNcmPzuWtRw3rhjQNP", - "price": "$?.??", + "id": PHONE_PLAN_ID_US_MONTHLY, + "price": "$4.99", }, "yearly": { - "id": "price_1LXUhcJNcmPzuWtRHUFHVk12", - "price": "$?.??", + "id": PHONE_PLAN_ID_US_YEARLY, + "price": "$3.99", }, }, - # TODO: Get plan ID for Canada - # "ca": { - # "monthly": { - # "id": "", - # "price": "$?.??", - # }, - # "yearly": { - # "id": "", - # "price": "$?.??", - # }, - # }, }, } PHONE_PLAN_COUNTRY_LANG_MAPPING = { "us": { "en": PHONE_PLAN_ID_MATRIX["usd"]["en"], }, - # Commented out; no plan ID known yet - # "ca": { - # "en": PHONE_PLAN_ID_MATRIX["usd"]["ca"], - # }, + "ca": { + "en": PHONE_PLAN_ID_MATRIX["usd"]["en"], + }, } BUNDLE_PLAN_ID_MATRIX = { "usd": { "en": { "yearly": { - "id": "price_1La3d7JNcmPzuWtRn0cg2EyH", + # To allow testing the subscription flow on stage, we can set + # a custom plan ID via an environment variable: + "id": BUNDLE_PLAN_ID_US, "price": "$?.??", }, }, - # TODO: Get plan ID for Canada - # "ca": { - # "yearly": { - # "id": "", - # "price": "$?.??", - # }, - # }, }, } BUNDLE_PLAN_COUNTRY_LANG_MAPPING = { "us": { "en": BUNDLE_PLAN_ID_MATRIX["usd"]["en"], }, - # Commented out; no plan ID known yet - # "ca": { - # "en": BUNDLE_PLAN_ID_MATRIX["usd"]["ca"], - # }, + "ca": { + "en": BUNDLE_PLAN_ID_MATRIX["usd"]["en"], + }, } SUBSCRIPTIONS_WITH_UNLIMITED = config("SUBSCRIPTIONS_WITH_UNLIMITED", default="")