feat: add endpoints desc
This commit is contained in:
@@ -3,7 +3,7 @@ from ulid import ULID
|
||||
from src.application.abstractions import IUnitOfWork
|
||||
from src.application.contracts import ILogger,IQueueMessanger
|
||||
from src.application.domain.enums import PaymentStatus
|
||||
from src.application.domain.exceptions import ApplicationException
|
||||
from src.application.domain.exceptions import PaymentMetadataException
|
||||
from src.infrastructure.config import settings
|
||||
from src.infrastructure.database.decorators import transactional
|
||||
from src.presentation.schemas.itpay_payment_models import ItpayPaymentData
|
||||
@@ -25,9 +25,9 @@ class CreatePaymentCommand:
|
||||
trace_id = str(metadata.get('trace_id') or self._logger.get_trace_id())
|
||||
self._logger.set_trace_id(trace_id)
|
||||
if not order_id:
|
||||
raise ApplicationException(status_code=400, message='Itpay webhook metadata missing order_id')
|
||||
raise PaymentMetadataException(message='Itpay webhook metadata missing order_id')
|
||||
if not user_id:
|
||||
raise ApplicationException(status_code=400, message='Itpay webhook metadata missing user_id')
|
||||
raise PaymentMetadataException(message='Itpay webhook metadata missing user_id')
|
||||
payment_created = await self._unit_of_work.payment_repository.create_completed(
|
||||
user_id=user_id,
|
||||
order_id=order_id,
|
||||
|
||||
Reference in New Issue
Block a user