import streamlit as st # Set a centered layout for a cleaner, minimal look st.set_page_config(layout="centered") # --- Start of User-Requested Content --- st.write("Hello") # --- End of User-Requested Content --- # --- Payment Variables (MUST UPDATE) --- # !!! CRITICAL 1: Replace this placeholder with your actual PayPal email or Merchant ID. !!! PAYPAL_BUSINESS_EMAIL = "maria.tsilimos@proton.me" CURRENCY_CODE = "USD" # !!! CRITICAL 2: URL to redirect the user to after they successfully complete payment on PayPal. SUCCESS_URL = "https://www.yourdomain.com/payment-thank-you" # --- Fixed Price Configuration --- FIXED_AMOUNT = 25.00 FIXED_ITEM_NAME = "Basic Service Payment" ITEM_NAME = FIXED_ITEM_NAME AMOUNT = FIXED_AMOUNT # --- End of Variables --- st.markdown("---") st.subheader(f"Secure Payment for {FIXED_ITEM_NAME}") st.write(f"Click below to pay the fixed amount of **${AMOUNT:.2f}**.") # Generate the payment link with success redirection (key is '&return={SUCCESS_URL}') PAYMENT_LINK = ( f"https://www.paypal.com/cgi-bin/webscr?" f"cmd=_xclick&" f"business={PAYPAL_BUSINESS_EMAIL}&" f"item_name={ITEM_NAME}&" f"amount={AMOUNT:.2f}&" f"currency_code={CURRENCY_CODE}&" f"return={SUCCESS_URL}" ) # HTML for a clean, functional PayPal Button paypal_html = f"""
""" # Inject the HTML into the Streamlit app st.markdown(paypal_html, unsafe_allow_html=True) st.markdown("---") st.info( "The payment link is fully configured to redirect the user to the URL specified in the `SUCCESS_URL` variable after payment completion." )