public MpesaApi(string consumerKey, string consumerSecret, MpesaApiOptions options, Func <HttpClient> httpClientFactory = null) { _httpClientFactory = httpClientFactory; _consumerKey = consumerKey; _consumerSecret = consumerSecret; _options = Options.From(options); }
public static Options From(MpesaApiOptions options) { return(new Options { ShortCode = options.ShortCode, Initiator = options.Initiator, InitiatorPassword = options.InitiatorPassword, PassKey = options.PassKey, IsLive = options.IsLive, QueueTimeoutURL = options.QueueTimeoutURL, ResultURL = options.ResultURL }); }