feat: update full path payment
This commit is contained in:
@@ -3,18 +3,19 @@ import orjson
|
||||
from fastapi import APIRouter, Depends, Request
|
||||
from fastapi.responses import ORJSONResponse
|
||||
from src.application.commands import CreateOrderCommand
|
||||
from src.application.commands import CreatePaymentCloudkassirCommand
|
||||
from src.application.commands import CreatePaymentCommand
|
||||
from src.application.contracts import ILogger
|
||||
from src.application.domain.dto import AuthContext
|
||||
from src.application.domain.enums import OrderStatus
|
||||
from src.application.domain.exceptions import ConflictException
|
||||
from src.presentation.decorators import require_access_token, csrf_protect
|
||||
from src.presentation.dependencies.commands import get_create_order_command, get_create_payment_cloudkassir_command
|
||||
from src.presentation.dependencies.commands import get_create_order_command, get_create_payment_command
|
||||
from src.presentation.dependencies.logger import get_logger
|
||||
from src.presentation.schemas.order import CreateOrder,CreateOrderResponse,ErrorResponse,OrderPaymentResponse
|
||||
from src.presentation.schemas.itpay_payment_models import ItpayPaymentData
|
||||
|
||||
order_router = APIRouter(prefix='/order', tags=['orders'])
|
||||
itpay_router = APIRouter(prefix='/itpay', tags=['itpay'])
|
||||
|
||||
|
||||
@order_router.post(
|
||||
@@ -86,10 +87,10 @@ async def create_order(
|
||||
return content
|
||||
|
||||
|
||||
@order_router.post('/webhook/itpay')
|
||||
@itpay_router.post('/webhook')
|
||||
async def itpay_webhook(
|
||||
request: Request,
|
||||
payment_command: CreatePaymentCloudkassirCommand = Depends(get_create_payment_cloudkassir_command),
|
||||
payment_command: CreatePaymentCommand = Depends(get_create_payment_command),
|
||||
logger: ILogger = Depends(get_logger),
|
||||
) -> ORJSONResponse:
|
||||
raw = await request.body()
|
||||
|
||||
Reference in New Issue
Block a user