add netopia payment process

This commit is contained in:
2025-11-06 10:48:57 +02:00
parent 5a40af5434
commit 6c713171ed
10 changed files with 566 additions and 72 deletions

View File

@@ -7,10 +7,14 @@ from pages.products.product import ProductPage
from pages.profile.profilepage import ProfilePage
from pages.shopping_cart.cart import Cart
from pages.shopping_cart.peload_card import PreloadCard
from pages.shopping_cart.payment_redirect import PaymentRedirect
import os
os.environ["FLET_SECRET_KEY"] = os.urandom(12).hex()
from dotenv import load_dotenv
load_dotenv()
def main(page: ft.Page):
page.title = "Taina Gustului"
page.theme_mode = ft.ThemeMode.LIGHT
@@ -72,6 +76,12 @@ def main(page: ft.Page):
page.add(preload.build())
page.update()
return
if route == '/payment/redirect':
redirect = PaymentRedirect(page)
page.add(redirect.build())
page.update()
return
# 5) Fallback 404
page.add(ft.Text("404: Page not found"))