diff --git a/docs/architecture.md b/docs/architecture.md index 5f5b532..f192e34 100644 --- a/docs/architecture.md +++ b/docs/architecture.md @@ -28,7 +28,7 @@ flowchart LR n_8["Package root"] n_0 --> n_1 n_1 --> n_2 - n_1 --> n_3 + n_1 --> n_5 n_1 --> n_4 n_7 --> n_0 n_7 --> n_5 diff --git a/src/orders/workflow/place.py b/src/orders/workflow/place.py index 34b5f68..b4b1717 100644 --- a/src/orders/workflow/place.py +++ b/src/orders/workflow/place.py @@ -1,11 +1,11 @@ from orders.domain.rules import check_amount from orders.events.port import publish_outcome -from orders.payment_port.api import authorize_payment +from orders.provider_adapter.client import send_authorization def place_order(order_id: str, cents: int, pay, publish) -> dict: check_amount(cents) - authorization = authorize_payment(pay, order_id, cents) + authorization = send_authorization(order_id, cents) status = "accepted" if authorization != "declined" else "declined" publish_outcome(publish, order_id, status) return {"order_id": order_id, "status": status, "authorization": authorization}