Spaces:
Running
Running
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +17 -6
src/streamlit_app.py
CHANGED
|
@@ -29,16 +29,15 @@ from streamlit_extras.stylable_container import stylable_container
|
|
| 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 =
|
| 42 |
FIXED_ITEM_NAME = "Premium Annual Subscription"
|
| 43 |
ITEM_NAME = FIXED_ITEM_NAME
|
| 44 |
AMOUNT = FIXED_AMOUNT
|
|
@@ -54,8 +53,7 @@ PAYMENT_LINK = (
|
|
| 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="
|
|
@@ -73,6 +71,16 @@ paypal_html = f"""
|
|
| 73 |
" onmouseover="this.style.backgroundColor='#FFAA00'" onmouseout="this.style.backgroundColor='#FFC439'">
|
| 74 |
Upgrade to Premium, ${AMOUNT:.2f}/a year
|
| 75 |
</a>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |
</div>
|
| 77 |
"""
|
| 78 |
|
|
@@ -85,12 +93,15 @@ col1, col_spacer, col3 = st.columns([1, 5, 1])
|
|
| 85 |
|
| 86 |
# --- Content ---
|
| 87 |
with col1:
|
| 88 |
-
st.write("
|
| 89 |
|
| 90 |
# --- Button (Top Right) ---
|
| 91 |
with col3:
|
| 92 |
st.markdown(paypal_html, unsafe_allow_html=True)
|
| 93 |
|
|
|
|
|
|
|
|
|
|
| 94 |
|
| 95 |
|
| 96 |
|
|
|
|
| 29 |
|
| 30 |
|
| 31 |
|
|
|
|
| 32 |
# --- Payment Variables ---
|
| 33 |
# !!! CRITICAL 1: Replace this placeholder with your actual PayPal email or Merchant ID. !!!
|
| 34 |
PAYPAL_BUSINESS_EMAIL = "maria.tsilimos@proton.me"
|
| 35 |
CURRENCY_CODE = "USD"
|
| 36 |
# !!! CRITICAL 2: URL to redirect the user to after they successfully complete payment on PayPal.
|
| 37 |
+
SUCCESS_URL = "https://premium-6msh.onrender.com"
|
| 38 |
|
| 39 |
# --- Fixed Price Configuration (Only one upgrade option) ---
|
| 40 |
+
FIXED_AMOUNT = 29.90 # Updated to $29.90
|
| 41 |
FIXED_ITEM_NAME = "Premium Annual Subscription"
|
| 42 |
ITEM_NAME = FIXED_ITEM_NAME
|
| 43 |
AMOUNT = FIXED_AMOUNT
|
|
|
|
| 53 |
f"return={SUCCESS_URL}"
|
| 54 |
)
|
| 55 |
|
| 56 |
+
# HTML for the yellow "Upgrade to Premium" Button and the instructional note below it
|
|
|
|
| 57 |
paypal_html = f"""
|
| 58 |
<div style="margin-top: 0px; text-align: right;">
|
| 59 |
<a href="{PAYMENT_LINK}" target="_blank" style="
|
|
|
|
| 71 |
" onmouseover="this.style.backgroundColor='#FFAA00'" onmouseout="this.style.backgroundColor='#FFC439'">
|
| 72 |
Upgrade to Premium, ${AMOUNT:.2f}/a year
|
| 73 |
</a>
|
| 74 |
+
|
| 75 |
+
<!-- Instructional note added below the button -->
|
| 76 |
+
<p style="
|
| 77 |
+
font-size: 10px;
|
| 78 |
+
color: #777;
|
| 79 |
+
margin-top: 5px;
|
| 80 |
+
line-height: 1.2;
|
| 81 |
+
">
|
| 82 |
+
Note: After purchase, press "Return to Seller" to be redirected to your new app.
|
| 83 |
+
</p>
|
| 84 |
</div>
|
| 85 |
"""
|
| 86 |
|
|
|
|
| 93 |
|
| 94 |
# --- Content ---
|
| 95 |
with col1:
|
| 96 |
+
st.write("")
|
| 97 |
|
| 98 |
# --- Button (Top Right) ---
|
| 99 |
with col3:
|
| 100 |
st.markdown(paypal_html, unsafe_allow_html=True)
|
| 101 |
|
| 102 |
+
|
| 103 |
+
|
| 104 |
+
|
| 105 |
|
| 106 |
|
| 107 |
|