Hermes Agent commited on
Commit
df34adf
·
1 Parent(s): b8eee28

fix: use exact pure UPI jishnupg2005-2@okaxis without payee name for direct 10rs payment

Browse files
Thunder/bot/plugins/subscription.py CHANGED
@@ -23,14 +23,11 @@ from Thunder.vars import Var
23
  awaiting_proof = set()
24
 
25
 
26
- def get_upi_link(user_id: int) -> str:
27
- note = f"FlashFile_Sub_{user_id}"
28
  params = {
29
  "pa": Var.UPI_ID,
30
- "pn": Var.UPI_NAME,
31
  "am": str(Var.SUB_PRICE),
32
- "cu": "INR",
33
- "tn": note
34
  }
35
  return f"upi://pay?{urllib.parse.urlencode(params)}"
36
 
@@ -201,8 +198,7 @@ async def sub_pay_callback(client: Client, query: CallbackQuery):
201
  "💳 **Flash File UPI Payment Details**\n\n"
202
  f"**Amount:** `₹{Var.SUB_PRICE}` (30-Day Unlimited Access)\n"
203
  f"**UPI ID:** `{Var.UPI_ID}`\n"
204
- f"**Name:** `{Var.UPI_NAME}`\n"
205
- f"**Reference Note:** `FlashFile_Sub_{user_id}`\n\n"
206
  "**How to Pay:**\n"
207
  "1. Tap the button below to launch Google Pay / PhonePe / Paytm.\n"
208
  "2. Or copy the UPI ID above and pay `₹10` in any UPI app.\n"
 
23
  awaiting_proof = set()
24
 
25
 
26
+ def get_upi_link(user_id: int = 0) -> str:
 
27
  params = {
28
  "pa": Var.UPI_ID,
 
29
  "am": str(Var.SUB_PRICE),
30
+ "cu": "INR"
 
31
  }
32
  return f"upi://pay?{urllib.parse.urlencode(params)}"
33
 
 
198
  "💳 **Flash File UPI Payment Details**\n\n"
199
  f"**Amount:** `₹{Var.SUB_PRICE}` (30-Day Unlimited Access)\n"
200
  f"**UPI ID:** `{Var.UPI_ID}`\n"
201
+
 
202
  "**How to Pay:**\n"
203
  "1. Tap the button below to launch Google Pay / PhonePe / Paytm.\n"
204
  "2. Or copy the UPI ID above and pay `₹10` in any UPI app.\n"
Thunder/server/stream_routes.py CHANGED
@@ -252,9 +252,7 @@ async def _serve_media_response(
252
 
253
  @routes.get("/pay", allow_head=True)
254
  async def upi_redirect_handler(request: web.Request):
255
- u = request.query.get("u", "")
256
- note = f"FlashFile_Sub_{u}" if u else "FlashFile_Sub"
257
- upi_uri = f"upi://pay?pa={Var.UPI_ID}&pn={quote(Var.UPI_NAME)}&am={Var.SUB_PRICE}&cu=INR&tn={note}"
258
  html = f"""<!DOCTYPE html>
259
  <html>
260
  <head>
 
252
 
253
  @routes.get("/pay", allow_head=True)
254
  async def upi_redirect_handler(request: web.Request):
255
+ upi_uri = f"upi://pay?pa={Var.UPI_ID}&am={Var.SUB_PRICE}&cu=INR"
 
 
256
  html = f"""<!DOCTYPE html>
257
  <html>
258
  <head>
Thunder/vars.py CHANGED
@@ -116,5 +116,4 @@ class Var:
116
  SUB_PRICE: int = int(os.getenv("SUB_PRICE", "10"))
117
  SUB_DURATION_DAYS: int = int(os.getenv("SUB_DURATION_DAYS", "30"))
118
  UPI_ID: str = os.getenv("UPI_ID", "jishnupg2005-2@okaxis").strip()
119
- UPI_NAME: str = os.getenv("UPI_NAME", "Flash File").strip()
120
  ADMIN_CHANNEL: int = int(os.getenv("ADMIN_CHANNEL", "0"))
 
116
  SUB_PRICE: int = int(os.getenv("SUB_PRICE", "10"))
117
  SUB_DURATION_DAYS: int = int(os.getenv("SUB_DURATION_DAYS", "30"))
118
  UPI_ID: str = os.getenv("UPI_ID", "jishnupg2005-2@okaxis").strip()
 
119
  ADMIN_CHANNEL: int = int(os.getenv("ADMIN_CHANNEL", "0"))