Command.cs 620 B

12345678910111213141516
  1. using Application.Abstractions.Messaging;
  2. using SharedKernel.Results;
  3. namespace Application.Features.Api.Payment.Toss.Webhook;
  4. /// <summary>
  5. /// 토스 일반결제 웹훅 처리 (PAYMENT_STATUS_CHANGED / DEPOSIT_CALLBACK).
  6. /// 일반결제 웹훅은 서명 헤더가 없으므로 본문을 신뢰하지 않는다 —
  7. /// paymentKey 로 조회 API 를 재호출해 그 결과만 반영한다.
  8. /// PaymentKey 가 없으면(DEPOSIT_CALLBACK) OrderID 로 TossConfirm 에서 보강한다.
  9. /// </summary>
  10. public sealed record Command(
  11. string? EventType,
  12. string? PaymentKey,
  13. string? OrderID
  14. ) : ICommand<Result>;