From db8de4804d68684b7491f7ebabe62e32055d817e Mon Sep 17 00:00:00 2001 From: Vlad Stan Date: Fri, 3 Oct 2025 15:16:15 +0300 Subject: [PATCH] fix: use `checking_id` instead of `payment_hash` (#104) --- tasks.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tasks.py b/tasks.py index de4820e..06f1ee1 100644 --- a/tasks.py +++ b/tasks.py @@ -81,7 +81,7 @@ async def send_webhook(payment: Payment, pay_link: PayLink, zap_receipt=None): timeout=6, ) await mark_webhook_sent( - payment.payment_hash, + payment.checking_id, r.status_code, r.is_success, r.reason_phrase, @@ -90,14 +90,14 @@ async def send_webhook(payment: Payment, pay_link: PayLink, zap_receipt=None): except Exception as exc: logger.error(exc) await mark_webhook_sent( - payment.payment_hash, -1, False, "Unexpected Error", str(exc) + payment.checking_id, -1, False, "Unexpected Error", str(exc) ) async def mark_webhook_sent( - payment_hash: str, status: int, is_success: bool, reason_phrase="", text="" + checking_id: str, status: int, is_success: bool, reason_phrase="", text="" ) -> None: - payment = await get_payment(payment_hash) + payment = await get_payment(checking_id) extra = payment.extra or {} extra["wh_status"] = status # keep for backwards compability extra["wh_success"] = is_success