コード例 #1
0
        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));
        }
コード例 #2
0
        public async Task <IActionResult> Create([FromBody] CreatePaymentHistoryDto command)
        {
            var response = await _paymentHistoryService.CreateAsync(command);

            return(CreatedAt(response));
        }