public void TestMerchantIdentifierServiceByMerchantId_FuzzyMatch() { options = new MerchantIdentifierRequestOptions("DIRECTSATELLITETV"); options.Type = "FuzzyMatch"; MerchantIds merchantIds = service.GetMerchantId(options); Assert.IsTrue(merchantIds.ReturnedMerchants != null); }
/// <summary> /// /// </summary> /// <param name="accountInquiry">HTTP request to send to MasterCard containing the Merchant ID and Type</param> /// <returns>MerchantIds - Recognizable merchant descriptors and location information</returns> public MerchantIds GetMerchantId(MerchantIdentifierRequestOptions options) { string response = ""; Dictionary<string, string> responseMap = doRequest(GetURL(options), "GET"); responseMap.TryGetValue(MESSAGE, out response); return Serializer<MerchantIds>.Deserialize(response); }
private String GetURL(MerchantIdentifierRequestOptions options) { String url; if (this.environment == Environments.Environment.PRODUCTION) { url = PRODUCTION_URL; } else { url = SANDBOX_URL; } url = URLUtil.AddQueryParameter(url, "MerchantId", options.GetMerchantId(), false, ""); url = URLUtil.AddQueryParameter(url, "Type", options.Type, false, ""); return url; }