From 84dfde570b76eb57df19f40b4ea563ab6c61c6ab Mon Sep 17 00:00:00 2001 From: renaud gaudin Date: Thu, 15 Aug 2024 10:22:07 +0000 Subject: [PATCH] Added TED Hotspot --- scheduler/src/routes/stripe.py | 11 ++++++- scheduler/src/templates/stripe/shop.html | 37 +++++++++++++++++++----- 2 files changed, 39 insertions(+), 9 deletions(-) diff --git a/scheduler/src/routes/stripe.py b/scheduler/src/routes/stripe.py index db2b918..11643bb 100644 --- a/scheduler/src/routes/stripe.py +++ b/scheduler/src/routes/stripe.py @@ -34,6 +34,7 @@ LANG_STRINGS = { "en": { "product_wikipedia": "Wikipedia Hotspot English", + "product_ted": "TED Hotspot", "product_preppers": "Preppers Hotspot", "product_computer": "Computer Hotspot", "product_access_1m": "One month Imager Access", @@ -41,6 +42,7 @@ }, "de": { "product_wikipedia": "Wikipedia Hotspot auf Deutsch", + "product_ted": "TED Hotspot", "product_preppers": "Preppers Hotspot", "product_computer": "Computer Hotspot", "product_access_1m": "One month Imager Access", @@ -48,6 +50,7 @@ }, "es": { "product_wikipedia": "Wikipedia Hotspot en español", + "product_ted": "TED Hotspot", "product_preppers": "Preppers Hotspot", "product_computer": "Computer Hotspot", "product_access_1m": "One month Imager Access", @@ -55,6 +58,7 @@ }, "fr": { "product_wikipedia": "Wikipedia Hotspot Français", + "product_ted": "TED Hotspot", "product_preppers": "Preppers Hotspot", "product_computer": "Computer Hotspot", "product_access_1m": "Accès Imager 1 mois", @@ -270,6 +274,11 @@ def handle_access_order(session, customer): os.getenv("STRIPE_PRICE_PP"), handle_image_order, ), + "ted": ( + os.getenv("STRIPE_METHOD_TED"), + os.getenv("STRIPE_PRICE_TED"), + handle_image_order, + ), "computer": ( os.getenv("STRIPE_METHOD_CS"), os.getenv("STRIPE_PRICE_CS"), @@ -419,7 +428,7 @@ def success(): context = {"customer": customer, "session": session, "shop_url": SHOP_PUBLIC_URL} product = session.metadata.get("product") - if product.startswith("wikipedia-") or product in ("preppers", "computer"): + if product.startswith("wikipedia-") or product in ("preppers", "computer", "ted"): kind = "image" http_url, torrent_url, _ = get_links_for(product) context.update({"http_url": http_url, "torrent_url": torrent_url}) diff --git a/scheduler/src/templates/stripe/shop.html b/scheduler/src/templates/stripe/shop.html index 1ada565..686ddb4 100644 --- a/scheduler/src/templates/stripe/shop.html +++ b/scheduler/src/templates/stripe/shop.html @@ -261,21 +261,20 @@

Wikipedia package

-

Preppers package

-

For all your SHTF needs

+

TED Talks

+

Tech, Entertainment & Design

$25
    -
  • Dozens of resources on homesteading, water treatment, military and emergency medicine, etc.
  • -
  • WikiHow, iFixit, and other repair resources
  • -
  • The entire Wikipedia
  • -
  • TrailSense and Survival apps for Android, ready to download
  • -
  • Fits on a 256 GB microSD card
  • +
  • More than 6,600 videos sorted by topics
  • +
  • From A like Astrobiology or AI to B like Business, M like Medicine... all the way to W like work-life balance
  • +
  • About 91 consecutive days of watching!
  • +
  • Requires a 1 TB microSD card
- +
@@ -306,6 +305,28 @@

Computer package

+
+
+

Preppers package

+

For all your SHTF needs

+
+
$25
+
+
    +
  • Dozens of resources on homesteading, water treatment, military and emergency medicine, etc.
  • +
  • WikiHow, iFixit, and other repair resources
  • +
  • The entire Wikipedia
  • +
  • TrailSense and Survival apps for Android, ready to download
  • +
  • Fits on a 256 GB microSD card
  • +
+
+
+ + +
+
+
+

Build your own