예제 #1
0
        public IActionResult UpdatePaymentTypeForOrder(int orderId, int paymentTypeId)
        {
            var checkOrderIsActive = _ordersRepository.CheckIfOrderIsActive(orderId);

            if (checkOrderIsActive != null)
            {
                var order = _ordersRepository.UpdateOrderWithNewPaymentType(orderId, paymentTypeId);
                return(Ok("Payment on Order Updated Successfully"));
            }
            return(NotFound("That order does not exist"));
        }