/// <summary> /// Get directory containing list of issuers (you should cache the response!) /// </summary> public DirectoryResponse SendDirectoryRequest() { // Set up dependencies for http request var directoryRequest = new DirectoryRequest(_configuration.MerchantId, _configuration.MerchantSubId); // Execute http request return (DirectoryResponse)_iDealHttpRequest.SendRequest(directoryRequest, _signatureProvider, _configuration.AcquirerUrl, _iDealHttpResponseHandler); }
public void CanCreateDirectoryRequest() { var directoryRequest = new DirectoryRequest("100", 2); Assert.AreEqual("100", directoryRequest.MerchantId); Assert.AreEqual(2, directoryRequest.MerchantSubId); Assert.AreEqual(directoryRequest.CreateDateTimeStamp + "1002", directoryRequest.MessageDigest); }
public void CanGetXmlRepresentationOfRequest() { var directoryRequest = new DirectoryRequest("ABCD", null); var xml = directoryRequest.ToXml(new SignatureProviders.SignatureProvider(PrivateCertificate, PublicCertificate)); Assert.IsNotNullOrEmpty(xml); }
public void SubIdDefaultsToZero() { var directoryRequest = new DirectoryRequest("ABCD", null); Assert.AreEqual(0, directoryRequest.MerchantSubId); }