public static async Task <Tuple <PostSearchResponseModel, ErrorModel> > PostPayStackPayment(ProcessPayStackPayment paystackpaymentopt) { using (HttpClientHelper client = new HttpClientHelper()) { PostSearchResponseModel bookobj = new PostSearchResponseModel(); ErrorModel errorModel = null; await client.ProcessClientRequestAsync <PostSearchResponseModel>(GigUrl.ProcessGigmsPayStack, HttpMethod.Post, paystackpaymentopt, success => { bookobj = success; if (success.Code.Equals("200")) { HttpContext.Current.Session["Success"] = true; HttpContext.Current.Session["booking"] = success; } else { HttpContext.Current.Session["Success"] = false; } }, error => { errorModel = error; HttpContext.Current.Session["Success"] = false; } ); return(new Tuple <PostSearchResponseModel, ErrorModel>(bookobj, errorModel)); } }
public static async Task <Tuple <PostSearchResponseModel, ErrorModel> > QuickTellerWebhook(QuickTellerResponseModel quickTellerPaymentopt) { using (HttpClientHelper client = new HttpClientHelper()) { PostSearchResponseModel bookobj = new PostSearchResponseModel(); ErrorModel errorModel = null; await client.ProcessClientRequestAsync <PostSearchResponseModel>(GigUrl.GigmsProcessQuickTellerPayment, HttpMethod.Post, quickTellerPaymentopt, success => { bookobj = success; }, error => { errorModel = error; } ); return(new Tuple <PostSearchResponseModel, ErrorModel>(bookobj, errorModel)); } }
public static async Task <Tuple <PostSearchResponseModel, ErrorModel> > PostGlobalPay(ProcessGlobalPay globalPay) { using (HttpClientHelper client = new HttpClientHelper()) { PostSearchResponseModel bookobj = new PostSearchResponseModel(); ErrorModel errorModel = null; await client.ProcessClientRequestAsync <PostSearchResponseModel>(GigUrl.ProcessGlobalPay, HttpMethod.Post, globalPay, success => { bookobj = success; }, error => { errorModel = error; } ); return(new Tuple <PostSearchResponseModel, ErrorModel>(bookobj, errorModel)); } }
public static async Task <Tuple <PostSearchResponseModel, ErrorModel> > PostFlutterWavePayment(ProcessFlutterWavePayment flutterwavepaymentopt) { using (HttpClientHelper client = new HttpClientHelper()) { PostSearchResponseModel bookobj = new PostSearchResponseModel(); ErrorModel errorModel = null; await client.ProcessClientRequestAsync <PostSearchResponseModel>(GigUrl.ProcessFlutterWavePayment, HttpMethod.Post, flutterwavepaymentopt, success => { bookobj = success; }, error => { errorModel = error; } ); return(new Tuple <PostSearchResponseModel, ErrorModel>(bookobj, errorModel)); } }
public static async Task <Tuple <PostSearchResponseModel, ErrorModel> > PostReschedulePayStackPayment(ProcessPayStackPayment paystackpaymentopt) { using (HttpClientHelper client = new HttpClientHelper()) { PostSearchResponseModel bookobj = new PostSearchResponseModel(); ErrorModel errorModel = null; await client.ProcessClientRequestAsync <PostSearchResponseModel>(GigUrl.ProcessPaystackPaymentForReschedule, HttpMethod.Post, paystackpaymentopt, success => { bookobj = success; }, error => { errorModel = error; } ); return(new Tuple <PostSearchResponseModel, ErrorModel>(bookobj, errorModel)); } }
public static async Task <Tuple <PostSearchResponseModel, ErrorModel> > PostSearchObjects(PostSearchModel fullbookingobj) { using (HttpClientHelper client = new HttpClientHelper()) { var bookobj = new PostSearchResponseModel(); ErrorModel errorModel = null; await client.ProcessClientRequestAsync <PostSearchResponseModel>(GigUrl.PostBookingDetails, HttpMethod.Post, fullbookingobj, success => { bookobj = success; }, error => { errorModel = error; } ); return(new Tuple <PostSearchResponseModel, ErrorModel>(bookobj, errorModel)); } }
public ActionResult PaymentConfirmation() { //Hire Service if (Session["HireResponse_"] != null) { bool IsReturnTrp = false; if ((int)Session["roundTripHire"] == 1) { IsReturnTrp = true; } var hireRequestReturn = IsReturnTrp ? (GetHireRefcodeRequestReturn)Session["HireRequest"] : null; var hireRequest = !IsReturnTrp ? (GetHireRefcodeRequest)Session["HireRequest"] : null; var hireResponse = new getVehicleForHireResponse(); var hireRefCodeAmountObj = new hireRefcodeAmount(); var hirePageVm = new PaymentConfirmatonHire(); try { hireResponse = (getVehicleForHireResponse)Session["HireResponse"]; hireRefCodeAmountObj = (hireRefcodeAmount)Session["HireResponse_"]; hirePageVm.BookingRequestReturn = hireRequestReturn; hirePageVm.BookingRequest = hireRequest; hirePageVm.BookingResponse = hireResponse; hirePageVm.HirePayResponse = hireRefCodeAmountObj; ViewBag.HireService = true; var vhire = (getVehicleForHireResponse)Session["HireResponse"]; return(View(hirePageVm)); } catch (Exception ex) { Logical.WriteToLog(ex.Message); return(View(hirePageVm)); } } else { var bookingRequest = new PostSearchModel(); var tranDetals = new PostSearchResponseModel(); tranDetals.Object = new PostSearchResponseModel.BookingResponse(); String otherSeats = String.Empty; var pageVm = new PaymentConfirmaton(); try { tranDetals = (PostSearchResponseModel)Session["transactionDetails"]; pageVm.BookingResponse = tranDetals.Object; pageVm.BookingRequest = (PostSearchModel)Session["BookingRequest"]; pageVm.BookingRequest.SeatNumber = pageVm.BookingRequest.SeatRegistrations.Split(':')[1]; int i = 0; foreach (var item in pageVm.BookingRequest.Beneficiaries) { i++; otherSeats += item.SeatNumber; if (i < pageVm.BookingRequest.Beneficiaries.Count) { otherSeats += ":"; } } Session["OtherSeats"] = otherSeats; // pageVm.BookingRequest.SeatRegistrations.Split } catch (Exception ex) { Logical.WriteToLog(ex.Message + "::" + ex.StackTrace); pageVm.BookingResponse = ((PostSearchResponseModel)Session["booking"]).Object; pageVm.BookingRequest = (PostSearchModel)Session["BookingRequest"]; int i = 0; foreach (var item in pageVm.BookingRequest.Beneficiaries) { i++; otherSeats += item.SeatNumber; if (i < pageVm.BookingRequest.Beneficiaries.Count) { otherSeats += ":"; } } } ViewBag.Status = true; return(View(pageVm)); } }