Closed italopessoa closed 1 week ago
This update introduces enhancements and new capabilities across multiple components of the ByteMeBurger system, notably in handling MercadoPago integration and payment processing. Important additions include new environment variables for MercadoPago in the docker-compose.yml
, extended logging for authorization failures, enhanced dependency injection configurations, and new methods for payment status synchronization. These changes collectively improve system robustness, logging capabilities, and integration with payment gateways.
File | Change Summary |
---|---|
docker-compose.yml |
Added environment variables MercadoPago__AccessToken and MercadoPago__NotificationUrl for web service configuration. |
.../Auth/MercadoPagoMessageAuthorizationFilter.cs |
Enhanced logging in the OnAuthorization method. |
.../Integration/WebhookController.cs |
Added IPaymentService and ILogger dependencies, updated Post method to log events and sync payment status. |
.../Application/ServiceCollectionsExtensions.cs |
Registered IUpdatePaymentStatusUseCase service. |
.../Application/Services/PaymentService.cs |
Added dependencies for payment status synchronization, new method SyncPaymentStatusWithGatewayAsync . |
.../UseCases/Payment/IUpdatePaymentStatusUseCase.cs |
Introduced IUpdatePaymentStatusUseCase interface. |
.../UseCases/Payment/UpdatePaymentStatusUseCase.cs |
Added UpdatePaymentStatusUseCase class and method Execute . |
.../Domain/Base/Entity.cs |
Added Created and Updated properties. |
.../Domain/Entities/Payment.cs |
Removed Created property. |
.../Domain/Interfaces/IPaymentGateway.cs |
Added method GetPaymentStatusAsync . |
.../Domain/Interfaces/IPaymentRepository.cs |
Added method UpdatePaymentStatusAsync . |
.../Domain/Interfaces/IPaymentService.cs |
Added method SyncPaymentStatusWithGatewayAsync . |
.../MercadoPago.Gateway/MercadoPagoService.cs |
Added logging dependency, new GetPaymentStatusAsync method, adjusted expiration time. |
.../MercadoPago.Gateway/Model/MercadoPagoWebhookEvent.cs |
Enhanced readability by breaking JsonPropertyName annotations onto separate lines. |
.../MercadoPago.Gateway/Security/MercadoPagoHmacSignatureValidator.cs |
Adjusted indentation in TryToValidate method. |
.../Persistence/Constants.cs |
Updated UpdateOrderStatusQuery to use @Updated , added UpdatePaymentStatusQuery . |
.../Persistence/Repository/OrderRepositoryDapper.cs |
Added try-catch block in UpdateOrderStatusAsync method for better error handling. |
.../Persistence/Repository/PaymentRepositoryDapper.cs |
Added UpdatePaymentStatusAsync method. |
.../Application.Test/Services/PaymentServiceTests.cs |
Added dependencies in PaymentService constructor, new tests for payment status update. |
.../Application.Test/UseCases/Payment/UpdatePaymentStatusUseCaseTest.cs |
Added new test class UpdatePaymentStatusUseCaseTest . |
.../Application.Test/UseCases/Payments/CreatePaymentUseCaseTest.cs |
Qualified expectedPayment variable type with namespace. |
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?
@coderabbitai the some of the comments will be fixed on the following MR https://github.com/soat-fiap/FIAP.TechChallenge.ByteMeBurger/pull/107
[!TIP] For best results, initiate chat on the files or code changes.
@italopessoa, thank you for the update. I understand that some of the comments will be addressed in the upcoming MR at https://github.com/soat-fiap/FIAP.TechChallenge.ByteMeBurger/pull/107. If you need any assistance with the changes or have any other requests for that MR, feel free to let me know.
Would you like to open a GitHub issue to track these fixes or enhancements more formally? This could help in organizing and prioritizing the tasks effectively. I can assist with creating the issue if you agree.
sync payment status
73 #97 #71 #74