Closed italopessoa closed 1 week ago
[!WARNING]
Review failed
The pull request is closed.
The updates mainly consist of enhancements and refactoring across multiple files and modules. Key changes include improved logging, updated order and payment status handling, better environment variable management, and new service registrations. Significant improvements were made in status synchronization between the application and payment gateways, along with refined entity status tracking. Test cases were also updated to reflect the modified business logic.
File/Path | Summary |
---|---|
docker-compose.yml |
Added new environment variables for MercadoPago API configuration. |
.../MercadoPagoMessageAuthorizationFilter.cs |
Enhanced logging of query parameters and request body information. |
.../WebhookController.cs |
Added new imports, logging of MercadoPago events, and synchronization calls for payment status with the gateway. |
.../OrderStatusDto.cs |
Renumbered enum values in OrderStatusDto . |
.../Program.cs |
Enriched log context before reading configuration in the Main method. |
.../ServiceCollectionsExtensions.cs |
Registered new service IUpdatePaymentStatusUseCase . |
.../PaymentService.cs |
Added new dependencies and method for synchronizing payment status. |
.../UpdateOrderStatusUseCase.cs |
Altered handling of order status, changed action associated with OrderStatus.InPreparation . |
.../UseCases/Payment/IUpdatePaymentStatusUseCase.cs |
Introduced new interface IUpdatePaymentStatusUseCase . |
.../UseCases/Payment/UpdatePaymentStatusUseCase.cs |
Added class UpdatePaymentStatusUseCase for updating payment status. |
.../Base/Entity.cs |
Added Created and Updated properties to Entity class for timestamp tracking. |
.../Entities/Order.cs |
Updated logic for initializing and transitioning order statuses. |
.../Entities/Payment.cs |
Removed Created property from Payment class. |
.../Interfaces/IPaymentGateway.cs |
Added new method GetPaymentStatusAsync to IPaymentGateway interface. |
.../Interfaces/IPaymentRepository.cs |
Added method UpdatePaymentStatusAsync to IPaymentRepository interface. |
.../Interfaces/IPaymentService.cs |
Added method SyncPaymentStatusWithGatewayAsync to IPaymentService . |
.../Domain/ValueObjects/OrderStatus.cs |
Modified the values assigned to OrderStatus enum members. |
.../MercadoPago.Gateway/MercadoPagoService.cs |
Added logging and new method GetPaymentStatusAsync for MercadoPagoService class. |
.../MercadoPago.Gateway/Model/MercadoPagoWebhookEvent.cs |
Improved readability by splitting attribute lines within JSON property annotations. |
.../Security/MercadoPagoHmacSignatureValidator.cs |
Adjusted the indentation of if statement within TryToValidate method. |
.../Persistence/Constants.cs |
Revised UpdateOrderStatusQuery and added UpdatePaymentStatusQuery . |
tests/.../OrderTests.cs |
Updated logic and method names in unit tests for order status transitions. |
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?
simplify order status