protected BaseResourceCielo(Guid merchantId, string merchantKey, string resourceName, Uri hostUri, NameValueCollection customHeaders) { if (merchantId == Guid.Empty || merchantKey == string.Empty) { merchantId = ConfigurationUtility.GetConfigurationKey("MerchantIdCielo"); merchantKey = ConfigurationUtility.GetConfigurationId("MerchantKeyCielo"); } this.HttpUtility = new HttpUtility(); System.Net.ServicePointManager.ServerCertificateValidationCallback = delegate { return(true); }; this.MerchantKey = merchantKey; if (hostUri != null) { this.HostUri = hostUri.ToString(); this.HostUri = this.HostUri.Remove(this.HostUri.Length - 1); } else { this.HostUri = this.GetServiceUri(); } this.ResourceName = resourceName; this._customHeader = customHeaders; }
public TransactionReportClient(Guid merchantKey, Uri hostUri) { if (merchantKey == Guid.Empty) { merchantKey = ConfigurationUtility.GetConfigurationKey("MerchantKey"); } this.MerchantKey = merchantKey; if (hostUri == null) { throw new ArgumentNullException("hostUri"); } this.HostUri = hostUri; this.HttpUtility = new HttpUtility(); }