Closed italopessoa closed 1 month ago
@coderabbitai create mermaid sequenceDiagram graph
[!TIP] For best results, initiate chat on the files or code changes.
sequenceDiagram
participant Webhook as Webhook Endpoint
participant MercadoPago as MercadoPago Gateway
participant PaymentRepo as Payment Repository
participant OrderStatusUC as UpdateOrderStatusUseCase
Webhook->>+MercadoPago: Receive payment confirmation
MercadoPago->>+PaymentRepo: GetPaymentStatus()
PaymentRepo->>+PaymentRepo: UpdatePayment()
PaymentRepo->>+OrderStatusUC: Payment approved?
alt Payment is approved
OrderStatusUC->>+OrderStatusUC: UpdateOrderStatus()
end
OrderStatusUC-->>-Webhook: Finish update
@italopessoa Here's the Mermaid sequence diagram for the webhook implementation process as described in the PR objectives. This diagram visualizes the interactions between the webhook endpoint, MercadoPago gateway, payment repository, and the order status update use case. Let me know if there are any adjustments or additional details you'd like to include!
Create a webhook endpoint that receives payment confirmation from the provider (e.g., Mercado Pago).
check the discussion for more details https://github.com/soat-fiap/FIAP.TechChallenge.ByteMeBurger/discussions/90