SMSPool: https + orderid params; verified real rent+refund
This commit is contained in:
10
app.py
10
app.py
@@ -178,7 +178,7 @@ It cannot tell you if a card has available funds. Fraud "flagged" status lives a
|
||||
return page("card", body)
|
||||
|
||||
# ---------- 3. SMS RENTALS ----------
|
||||
SMSP = "http://api.smspool.net"
|
||||
SMSP = "https://api.smspool.net"
|
||||
SERVICES = [("google","Google"),("discord","Discord"),("telegram","Telegram"),("whatsapp","WhatsApp"),("other","Other/Any")]
|
||||
COUNTRIES = [("1","United States"),("2","United Kingdom"),("4","Netherlands"),("22","Russia"),("150","Germany")]
|
||||
|
||||
@@ -209,7 +209,7 @@ def sms():
|
||||
msg = f'<div class="card"><span class="tag bad">RENT FAILED</span><br><pre>{b[:400]}</pre></div>'
|
||||
elif act == "check":
|
||||
pid = request.form["pid"]
|
||||
st, b = sms_api("sms/check", purchase_id=pid)
|
||||
st, b = sms_api("sms/check", orderid=pid)
|
||||
d = jf(b) or {}
|
||||
sms_txt = d.get("sms") or d.get("code") or ""
|
||||
status = d.get("status", "?")
|
||||
@@ -217,7 +217,7 @@ def sms():
|
||||
msg = f'<div class="card"><span class="tag {color}">STATUS: {status}</span> {"<b style=color:var(--ok)>" + str(sms_txt) + "</b>" if sms_txt else "no code yet — poll again in 10s"}</div>'
|
||||
elif act == "cancel":
|
||||
pid = request.form["pid"]
|
||||
st, b = sms_api("sms/cancel", purchase_id=pid)
|
||||
st, b = sms_api("sms/cancel", orderid=pid)
|
||||
d = jf(b) or {}
|
||||
ok = d.get("success") == 1
|
||||
con = db(); con.execute("UPDATE sms_rentals SET status=? WHERE purchase_id=?", ("refunded" if ok else "cancel-failed", pid)); con.commit()
|
||||
@@ -251,12 +251,12 @@ def api_sms_rent():
|
||||
|
||||
@app.route("/api/sms/check", methods=["POST"])
|
||||
def api_sms_check():
|
||||
st, b = sms_api("sms/check", purchase_id=request.form["pid"])
|
||||
st, b = sms_api("sms/check", orderid=request.form["pid"])
|
||||
return jf(b) or jsonify({"error": b[:200]})
|
||||
|
||||
@app.route("/api/sms/cancel", methods=["POST"])
|
||||
def api_sms_cancel():
|
||||
st, b = sms_api("sms/cancel", purchase_id=request.form["pid"])
|
||||
st, b = sms_api("sms/cancel", orderid=request.form["pid"])
|
||||
return jf(b) or jsonify({"error": b[:200]})
|
||||
|
||||
# ---------- 4. PROXY LAB ----------
|
||||
|
||||
Reference in New Issue
Block a user