public JsonResult GetTourClientByEmail(string emailAddress) { _serviceEndPoint = new ServicesEndPoint.GeneralSevices.ServicesEndPoint(_simbaToursUnitOfWork, _emailService); var tourClient = _serviceEndPoint.GetTourClient(emailAddress); return(Json(tourClient)); }
public IActionResult MakePayment([FromBody] UserDetailViewModel userDetail) { _serviceEndPoint = new ServicesEndPoint.GeneralSevices.ServicesEndPoint(_simbaToursUnitOfWork, _emailService); TourClient tourClient = _serviceEndPoint.GetTourClient(userDetail.EmailAddress); var payPalRedirectUrl = ValidatePayment(tourClient, userDetail.CurrentPayment); payPalRedirectUrl += "&clientId=" + tourClient.TourClientId; //return Redirect(payPalRedirectUrl); return(Json(new { PayPalRedirectUrl = payPalRedirectUrl, PaymentCompletion = "Success", Message = "The payment will be acquired by Paypal reporting, and you will be informed by email whether successful. Wait for the email." })); }