/// <summary> /// Formats an init request before its sent to Paynow /// </summary> /// <param name="payment"></param> /// <returns></returns> private Dictionary <string, string> FormatInitRequest(Payment payment) { var items = payment.ToDictionary(); items["returnurl"] = ReturnUrl.Trim(); items["resulturl"] = ResultUrl.Trim(); items["id"] = IntegrationId; items.Add("hash", Hash.Make(items, IntegrationKey)); return(items); }
/// <summary> /// Initiate a new Paynow transaction /// </summary> /// <remarks> /// Currently, only eccocash is supported /// </remarks> /// <param name="payment">The transaction to be sent to Paynow</param> /// <param name="phone">The user's phone number</param> /// <param name="method">The mobile transaction method i.e ecocash, telecash</param> /// <returns></returns> private Dictionary <string, string> FormatMobileInitRequest(Payment payment, string phone, string method) { var items = payment.ToDictionary(); items["returnurl"] = ReturnUrl.Trim(); items["resulturl"] = ResultUrl.Trim(); items["id"] = IntegrationId; items["phone"] = phone; items["method"] = method; items.Add("hash", Hash.Make(items, IntegrationKey)); return(items); }