Created
September 12, 2025 23:23
-
-
Save rcarubbi/c05b2d89721b90e66ce5106044f89d18 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Adaptador HTTP do callback do parceiro: Published Language do parceiro -> Translator -> nosso caso de uso | |
| [ApiController] | |
| [Route("callbacks/payments")] | |
| public sealed class PartnerPaymentsCallbackController : ControllerBase | |
| { | |
| private readonly PaymentAclTranslator _translator; | |
| private readonly IApplyPaymentSettlement _apply; | |
| public PartnerPaymentsCallbackController(PaymentAclTranslator translator, IApplyPaymentSettlement apply) | |
| { | |
| _translator = translator; | |
| _apply = apply; | |
| } | |
| [HttpPost("settlement")] | |
| public IActionResult Post([FromBody] PartnerSettlementDto partnerDto) | |
| { | |
| var notification = _translator.FromSettlement(partnerDto); | |
| _apply.Apply(notification); | |
| return Ok(); | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment