feat: update full path payment

This commit is contained in:
2026-05-11 13:48:02 +03:00
parent ad51f1220f
commit d7ccddc72c
11 changed files with 133 additions and 148 deletions

View File

@@ -25,7 +25,7 @@ class CreatePaymentCommand:
raise ApplicationException(status_code=400, message='Itpay webhook metadata missing order_id')
if not user_id:
raise ApplicationException(status_code=400, message='Itpay webhook metadata missing user_id')
await self._unit_of_work.payment_repository.create_completed(
payment_created = await self._unit_of_work.payment_repository.create_completed(
user_id=user_id,
order_id=order_id,
itpay_payment_id=str(payment.id),
@@ -34,6 +34,8 @@ class CreatePaymentCommand:
paid_at=str(payment.paid) if payment.paid is not None else None,
expired_date=str(payment.expired_date) if payment.expired_date is not None else None,
)
if not payment_created:
return
message_id = str(ULID())
message: dict[str,str] = {
'order_id': order_id,