Exemplo n.º 1
0
 public bool makePayment(string sReservations, PaymentDetails pDetails)
 {
     //dummy method assumes that the payment is paid successfully via a payment gateway.
     return true;
 }
Exemplo n.º 2
0
        private string makeReservation(IFlightBLL flightBLL, int iRouteID, DateTime dtFlight, List<Passenger> lstPassengers)
        {
            try
            {
                string s= flightBLL.reserveFlight(iRouteID, dtFlight, lstPassengers);
                Console.WriteLine("Flight reserved - Reservation Reference - {0}", s);

                //Make Payment
                PaymentDetails p = new PaymentDetails();
                p.CardName = "UOB Visa";
                p.CardHolderName = lstPassengers.FirstOrDefault().PassengerName;
                p.CardExpiryDate = dtFlight.AddDays(60);
                p.Cv2 = "039";
                flightBLL.makePayment(s, p);

                return s;
            }
            catch (FlightException fe)
            {
                Console.WriteLine(fe.Message);
            }
            return "N/A";
        }