/// <summary> /// /// </summary> /// <param name="credentials"></param> /// <param name="payment"></param> /// <returns></returns> internal static string BuildCheckoutUrl(Credentials credentials, PaymentRequest payment) { var builder = new QueryStringBuilder(); var data = PaymentParse.GetData(payment); builder.EncodeCredentialsAsQueryString(credentials); foreach (var pair in data) { builder.Append(pair.Key, pair.Value); } return(builder.ToString()); }
/// <summary> /// /// </summary> /// <param name="credentials"></param> /// <param name="payment"></param> /// <returns></returns> internal static string BuildCheckoutUrl(Credentials credentials, PaymentRequest payment) { QueryStringBuilder builder = new QueryStringBuilder(); IDictionary <string, string> data = PaymentParse.GetData(payment); builder. EncodeCredentialsAsQueryString(credentials); foreach (KeyValuePair <string, string> pair in data) { builder.Append(pair.Key, pair.Value); } return(builder.ToString()); }
public static Order CreateOrderAndPayAndFinish(List <Clothes> list, Person customer) { Order order = new Order(); order.Customer = customer; order.Items = list; Console.WriteLine($"The total for your order is ${order.GetTotal()} with tax. How would you like to pay for it?"); Console.WriteLine("Enter Cash, Credit, or Check"); string s = Console.ReadLine().ToLower(); PaymentType p = PaymentParse.Parse(s); order.MakePayment(p); System.Threading.Thread.Sleep(3500); Console.Clear(); return(order); }