fix: Update payment confirmation message and redirect logic in booking flow
This commit is contained in:
+7
-2
@@ -54,7 +54,7 @@ BOOKING_FLOW_MAP = {
|
|||||||
},
|
},
|
||||||
"payment": {
|
"payment": {
|
||||||
"title": "Buchung vor dem Zahlungsschritt prüfen",
|
"title": "Buchung vor dem Zahlungsschritt prüfen",
|
||||||
"intro": "Bitte prüfen Sie die Angaben noch einmal. Nach Ihrer Bestätigung wird die Buchung per POST an /booking/payment übermittelt.",
|
"intro": "Bitte prüfen Sie die Angaben noch einmal. Sie bekommen bei bestätigung ihre Rechnung per Email versendet.",
|
||||||
"confirm_label": "Jetzt kostenpflichtig buchen",
|
"confirm_label": "Jetzt kostenpflichtig buchen",
|
||||||
"message_prefix": "Ich möchte das Paket",
|
"message_prefix": "Ich möchte das Paket",
|
||||||
"message_suffix": "kostenpflichtig buchen. Bitte prüfen Sie die Angaben und senden Sie mir die nächsten Schritte.",
|
"message_suffix": "kostenpflichtig buchen. Bitte prüfen Sie die Angaben und senden Sie mir die nächsten Schritte.",
|
||||||
@@ -1982,6 +1982,7 @@ def booking_payment():
|
|||||||
booking_flow = "payment"
|
booking_flow = "payment"
|
||||||
|
|
||||||
selected_package = BOOKING_PACKAGE_MAP.get(package_raw)
|
selected_package = BOOKING_PACKAGE_MAP.get(package_raw)
|
||||||
|
package_price = BOOKING_PRICE_MAP.get(package_raw)
|
||||||
if not selected_package:
|
if not selected_package:
|
||||||
flash("Ungültige Buchungsoption ausgewählt.", "error")
|
flash("Ungültige Buchungsoption ausgewählt.", "error")
|
||||||
return redirect(url_for("preise"))
|
return redirect(url_for("preise"))
|
||||||
@@ -2005,6 +2006,7 @@ def booking_payment():
|
|||||||
review_data = {
|
review_data = {
|
||||||
"package": selected_package,
|
"package": selected_package,
|
||||||
"package_key": package_raw,
|
"package_key": package_raw,
|
||||||
|
"package_price": package_price,
|
||||||
"flow": booking_flow,
|
"flow": booking_flow,
|
||||||
"title": flow_config["title"],
|
"title": flow_config["title"],
|
||||||
"intro": flow_config["intro"],
|
"intro": flow_config["intro"],
|
||||||
@@ -2115,7 +2117,10 @@ def booking_payment():
|
|||||||
else f"Buchung für {selected_package} wurde erfolgreich erfasst."
|
else f"Buchung für {selected_package} wurde erfolgreich erfasst."
|
||||||
)
|
)
|
||||||
flash(success_text, "success")
|
flash(success_text, "success")
|
||||||
return redirect(url_for("user_chat"))
|
if booking_flow == "payment":
|
||||||
|
return redirect(url_for("my_invoices"))
|
||||||
|
else:
|
||||||
|
return redirect(url_for("user_chat"))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user