public async Task <GetPaymentHistoryDto> CreateAsync(CreatePaymentHistoryDto dto) { var authHeader = _httpContextAccessor.GetAuthorizationHeaderOrDefault(); var order = await _orderApiClient.GetCurrentOrderAsync(authHeader); dto.OrderId = order.Id; return(await _paymentHistoryApiClient.CreatePaymentHistoryAsync(authHeader, dto)); }
public async Task <IActionResult> Create([FromBody] CreatePaymentHistoryDto command) { var response = await _paymentHistoryService.CreateAsync(command); return(CreatedAt(response)); }