Spaces:
Running
Running
Update src/streamlit_app.py
Browse files- src/streamlit_app.py +0 -62
src/streamlit_app.py
CHANGED
|
@@ -34,68 +34,6 @@ from streamlit_extras.stylable_container import stylable_container
|
|
| 34 |
|
| 35 |
|
| 36 |
|
| 37 |
-
# --- Payment Variables ---
|
| 38 |
-
# !!! CRITICAL 1: Replace this placeholder with your actual PayPal email or Merchant ID. !!!
|
| 39 |
-
PAYPAL_BUSINESS_EMAIL = "maria.tsilimos@proton.me"
|
| 40 |
-
CURRENCY_CODE = "USD"
|
| 41 |
-
# !!! CRITICAL 2: URL to redirect the user to after they successfully complete payment on PayPal.
|
| 42 |
-
SUCCESS_URL = "https://premium-6msh.onrender.com" # Updated SUCCESS URL
|
| 43 |
-
|
| 44 |
-
# --- Fixed Price Configuration (Only one upgrade option) ---
|
| 45 |
-
FIXED_AMOUNT = 29.90 # Updated to $29.90
|
| 46 |
-
FIXED_ITEM_NAME = "Premium Annual Subscription"
|
| 47 |
-
ITEM_NAME = FIXED_ITEM_NAME
|
| 48 |
-
AMOUNT = FIXED_AMOUNT
|
| 49 |
-
|
| 50 |
-
# Generate the payment link with success redirection
|
| 51 |
-
PAYMENT_LINK = (
|
| 52 |
-
f"https://www.paypal.com/cgi-bin/webscr?"
|
| 53 |
-
f"cmd=_xclick&"
|
| 54 |
-
f"business={PAYPAL_BUSINESS_EMAIL}&"
|
| 55 |
-
f"item_name={ITEM_NAME}&"
|
| 56 |
-
f"amount={AMOUNT:.2f}&"
|
| 57 |
-
f"currency_code={CURRENCY_CODE}&"
|
| 58 |
-
f"return={SUCCESS_URL}"
|
| 59 |
-
)
|
| 60 |
-
|
| 61 |
-
# HTML for the yellow "Upgrade to Premium" Button (Note removed)
|
| 62 |
-
paypal_html = f"""
|
| 63 |
-
<div style="margin-top: 0px; text-align: right;">
|
| 64 |
-
<a href="{PAYMENT_LINK}" target="_blank" style="
|
| 65 |
-
display: inline-block;
|
| 66 |
-
padding: 8px 16px;
|
| 67 |
-
font-size: 14px;
|
| 68 |
-
font-weight: bold;
|
| 69 |
-
color: black !important; /* Text color changed to black */
|
| 70 |
-
background-color: #FFC439; /* Yellow color */
|
| 71 |
-
border-radius: 5px;
|
| 72 |
-
text-align: center;
|
| 73 |
-
text-decoration: none;
|
| 74 |
-
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
|
| 75 |
-
transition: background-color 0.1s;
|
| 76 |
-
" onmouseover="this.style.backgroundColor='#FFAA00'" onmouseout="this.style.backgroundColor='#FFC439'">
|
| 77 |
-
Upgrade to Premium, ${AMOUNT:.2f}/a year
|
| 78 |
-
</a>
|
| 79 |
-
</div>
|
| 80 |
-
"""
|
| 81 |
-
|
| 82 |
-
# --- Layout: Place content and the button on the same top row ---
|
| 83 |
-
# col1: for the main content (now empty)
|
| 84 |
-
# col_spacer: to push the button to the far right
|
| 85 |
-
# col3: for the "Upgrade" button
|
| 86 |
-
|
| 87 |
-
col1, col_spacer, col3 = st.columns([1, 5, 1])
|
| 88 |
-
|
| 89 |
-
# --- Content ---
|
| 90 |
-
with col1:
|
| 91 |
-
st.write("") # Ensures the top-left area is clean
|
| 92 |
-
|
| 93 |
-
# --- Button (Top Right) ---
|
| 94 |
-
with col3:
|
| 95 |
-
st.markdown(paypal_html, unsafe_allow_html=True)
|
| 96 |
-
|
| 97 |
-
|
| 98 |
-
|
| 99 |
|
| 100 |
|
| 101 |
|
|
|
|
| 34 |
|
| 35 |
|
| 36 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 37 |
|
| 38 |
|
| 39 |
|