Spaces:
Running
Running
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +14 -9
src/streamlit_app.py
CHANGED
|
@@ -28,16 +28,18 @@ from streamlit_extras.stylable_container import stylable_container
|
|
| 28 |
|
| 29 |
|
| 30 |
|
|
|
|
|
|
|
| 31 |
# --- Payment Variables ---
|
| 32 |
# !!! CRITICAL 1: Replace this placeholder with your actual PayPal email or Merchant ID. !!!
|
| 33 |
PAYPAL_BUSINESS_EMAIL = "maria.tsilimos@proton.me"
|
| 34 |
CURRENCY_CODE = "USD"
|
| 35 |
# !!! CRITICAL 2: URL to redirect the user to after they successfully complete payment on PayPal.
|
| 36 |
-
SUCCESS_URL = "https://
|
| 37 |
|
| 38 |
# --- Fixed Price Configuration (Only one upgrade option) ---
|
| 39 |
-
FIXED_AMOUNT =
|
| 40 |
-
FIXED_ITEM_NAME = "Premium
|
| 41 |
ITEM_NAME = FIXED_ITEM_NAME
|
| 42 |
AMOUNT = FIXED_AMOUNT
|
| 43 |
|
|
@@ -52,7 +54,8 @@ PAYMENT_LINK = (
|
|
| 52 |
f"return={SUCCESS_URL}"
|
| 53 |
)
|
| 54 |
|
| 55 |
-
# HTML for
|
|
|
|
| 56 |
paypal_html = f"""
|
| 57 |
<div style="margin-top: 0px; text-align: right;">
|
| 58 |
<a href="{PAYMENT_LINK}" target="_blank" style="
|
|
@@ -60,15 +63,15 @@ paypal_html = f"""
|
|
| 60 |
padding: 8px 16px;
|
| 61 |
font-size: 14px;
|
| 62 |
font-weight: bold;
|
| 63 |
-
color:
|
| 64 |
-
background-color: #
|
| 65 |
border-radius: 5px;
|
| 66 |
text-align: center;
|
| 67 |
text-decoration: none;
|
| 68 |
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
| 69 |
transition: background-color 0.1s;
|
| 70 |
-
" onmouseover="this.style.backgroundColor='#
|
| 71 |
-
Upgrade
|
| 72 |
</a>
|
| 73 |
</div>
|
| 74 |
"""
|
|
@@ -88,7 +91,9 @@ with col1:
|
|
| 88 |
with col3:
|
| 89 |
st.markdown(paypal_html, unsafe_allow_html=True)
|
| 90 |
|
| 91 |
-
|
|
|
|
|
|
|
| 92 |
|
| 93 |
|
| 94 |
|
|
|
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
+
|
| 32 |
+
|
| 33 |
# --- Payment Variables ---
|
| 34 |
# !!! CRITICAL 1: Replace this placeholder with your actual PayPal email or Merchant ID. !!!
|
| 35 |
PAYPAL_BUSINESS_EMAIL = "maria.tsilimos@proton.me"
|
| 36 |
CURRENCY_CODE = "USD"
|
| 37 |
# !!! CRITICAL 2: URL to redirect the user to after they successfully complete payment on PayPal.
|
| 38 |
+
SUCCESS_URL = "https://premium-6msh.onrender.com/"
|
| 39 |
|
| 40 |
# --- Fixed Price Configuration (Only one upgrade option) ---
|
| 41 |
+
FIXED_AMOUNT = 1 # Updated to $29.90
|
| 42 |
+
FIXED_ITEM_NAME = "Premium Annual Subscription"
|
| 43 |
ITEM_NAME = FIXED_ITEM_NAME
|
| 44 |
AMOUNT = FIXED_AMOUNT
|
| 45 |
|
|
|
|
| 54 |
f"return={SUCCESS_URL}"
|
| 55 |
)
|
| 56 |
|
| 57 |
+
# HTML for the yellow "Upgrade to Premium" Button
|
| 58 |
+
# Background is set to a bright yellow (#FFC439) and text is black for contrast.
|
| 59 |
paypal_html = f"""
|
| 60 |
<div style="margin-top: 0px; text-align: right;">
|
| 61 |
<a href="{PAYMENT_LINK}" target="_blank" style="
|
|
|
|
| 63 |
padding: 8px 16px;
|
| 64 |
font-size: 14px;
|
| 65 |
font-weight: bold;
|
| 66 |
+
color: black !important; /* Text color changed to black */
|
| 67 |
+
background-color: #FFC439; /* Yellow color */
|
| 68 |
border-radius: 5px;
|
| 69 |
text-align: center;
|
| 70 |
text-decoration: none;
|
| 71 |
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
| 72 |
transition: background-color 0.1s;
|
| 73 |
+
" onmouseover="this.style.backgroundColor='#FFAA00'" onmouseout="this.style.backgroundColor='#FFC439'">
|
| 74 |
+
Upgrade to Premium, ${AMOUNT:.2f}/a year
|
| 75 |
</a>
|
| 76 |
</div>
|
| 77 |
"""
|
|
|
|
| 91 |
with col3:
|
| 92 |
st.markdown(paypal_html, unsafe_allow_html=True)
|
| 93 |
|
| 94 |
+
|
| 95 |
+
|
| 96 |
+
|
| 97 |
|
| 98 |
|
| 99 |
|