fix(payments): pedning status in transactions

This commit is contained in:
BADtochka
2026-06-09 16:36:04 +03:00
parent ca88c995b8
commit 5c96fcd519
6 changed files with 93 additions and 10 deletions
@@ -356,7 +356,7 @@ async def render_link_or_fail(
payment as ``failed_creation``. Every link-style provider used to inline
this same sequence.
"""
if api_success and provider_payment_id:
if api_success and provider_payment_id and payment_url:
await safe_store_provider_payment_id(
session,
payment,
@@ -39,7 +39,9 @@ async def finalize_webapp_link_payment(
log_prefix="Wata",
)
"""
if api_success and provider_payment_id:
# Reuse logic needs both a provider id and a redirect URL; persisting only
# the id creates orphan records that match find_recent but fail verification.
if api_success and provider_payment_id and payment_url:
try:
await payment_dal.update_provider_payment_and_status(
session,