public IActionResult GetPaymentDetail(Guid trackingNumber) { _logger.LogInformation($"Starting GetPaymentDetail method for {trackingNumber}"); var paymentResult = _dataOperations.GetTrackingInfo(trackingNumber); return(paymentResult != null ? new ObjectResult(new ResponseModel <ResponseLogEntity>() { Success = true, TrackingNumber = trackingNumber, Data = paymentResult, Notification = "OK" }) { StatusCode = (int)HttpStatusCode.OK } : new ObjectResult(new ResponseModel <ResponseLogEntity>() { Success = false, TrackingNumber = trackingNumber, Notification = "Payment info not found with the given identifier" }) { StatusCode = (int)HttpStatusCode.NotFound }); }