/// <summary> /// Save Charter Information /// </summary> /// <param name="request">Request</param> /// <param name="paymentMethod">Payment method</param> /// <returns>Charter unique id</returns> private async Task <string> SaveCharterInformation( YachtSavePackageServiceModel request, string paymentMethod) { var response = await _yachtCharteringService.SaveCharterInformation(request, paymentMethod); var isSuccess = response.IsValidResponse() && (string.IsNullOrEmpty(response.ResponseData.UniqueId) == false); return(isSuccess ? response.ResponseData.UniqueId : string.Empty); }
//*****modified by hoangle 10-10-2019 //*****next modified by public IActionResult SaveCharterPrivatePayment(YachtSavePackageServiceModel yachtPackageModel, string PaymentMethod) { var result = _yachtService.SaveCharterPrivatePayment(yachtPackageModel, PaymentMethod); return(Ok(result)); }
/// <summary> /// Save Charter Information /// </summary> /// <param name="request"></param> /// <param name="paymentMethod"></param> /// <returns></returns> public async Task <BaseResponse <SaveCharterPaymentResponseViewModel> > SaveCharterInformation(YachtSavePackageServiceModel request, string paymentMethod) { try { var url = string.Format(_baseYatchApiUrl + _yachtPortalApiUrl.Yatchs.CharterPrivatePayment, paymentMethod); var response = await _apiExcute.PostData <SaveCharterPaymentResponseViewModel, YachtSavePackageServiceModel> (url, HttpMethodEnum.POST, new BaseRequest <YachtSavePackageServiceModel>(request)); return(response); } catch (Exception ex) { return(BaseResponse <SaveCharterPaymentResponseViewModel> .InternalServerError(message : ex.Message, fullMsg : ex.StackTrace)); } }