예제 #1
0
        public JsonResult GetTourClientByEmail(string emailAddress)
        {
            _serviceEndPoint = new ServicesEndPoint.GeneralSevices.ServicesEndPoint(_simbaToursUnitOfWork, _emailService);
            var tourClient = _serviceEndPoint.GetTourClient(emailAddress);

            return(Json(tourClient));
        }
예제 #2
0
        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." }));
        }