fix(api): change pally webhook endpoint from /success to /result

This commit is contained in:
2026-05-31 14:14:17 +07:00
parent f9d3fbf937
commit 763e041a8b
2 changed files with 4 additions and 3 deletions

View File

@@ -20,7 +20,7 @@ router = APIRouter(prefix="/pally")
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
@router.post("/success") @router.post("/result")
async def pally_callback( async def pally_callback(
id: str = Form(...), id: str = Form(...),
bill_id: str = Form(...), bill_id: str = Form(...),

View File

@@ -19,6 +19,7 @@ from dotenv import load_dotenv
load_dotenv() load_dotenv()
ENDPOINT = "/pally/result"
def calculate_signature( def calculate_signature(
payment_id: str, payment_id: str,
@@ -70,9 +71,9 @@ def main():
"signature": signature, "signature": signature,
} }
print(f"{args.host}/checkout/pally/callback") print(f"{args.host}{ENDPOINT}")
print(f"Отправляю вебхук: {payload}\n") print(f"Отправляю вебхук: {payload}\n")
response = httpx.post(f"{args.host}/checkout/pally/callback", data=payload) response = httpx.post(f"{args.host}{ENDPOINT}", data=payload)
print(f"Статус ответа: {response.status_code}") print(f"Статус ответа: {response.status_code}")
print(f"Тело ответа: {response.text}") print(f"Тело ответа: {response.text}")