invoice payment! prerelease

This commit is contained in:
2026-02-15 15:04:50 +07:00
parent 50b1a8f80c
commit 36ffca460f
15 changed files with 240 additions and 41 deletions

View File

@@ -126,29 +126,6 @@ class OrderService:
return order_item.quantity
async def clear_cart_item(
self, session: AsyncSession, *, customer: int, product_id: int
) -> None:
order = await self.order_repo.get_draft_order_by_user(session, customer)
if not order:
raise OrderServiceException(
"attempt of clearing a non-existing cart, potential callback_query exploit, ignoring..."
)
order_item = await self.order_items_repo.get_item_by_order_and_product(
session, order_id=order.id, product_id=product_id
)
if not order_item:
raise OrderServiceException(
"attempt of clearing an order_item that isn't in a cart, potential callback_query exploit, ignoring..."
)
await self.order_items_repo.update_order_item_quantity(
session, order_item_id=order_item.id, quantity=0
)
async def build_pagination_cart_dto(
self,
session: AsyncSession,