Ejemplo n.º 1
0
 /// <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);
 }
Ejemplo n.º 2
0
        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);
        }
Ejemplo n.º 3
0
 public void CanGetXmlRepresentationOfRequest()
 {
     var directoryRequest = new DirectoryRequest("ABCD", null);
     var xml = directoryRequest.ToXml(new SignatureProviders.SignatureProvider(PrivateCertificate, PublicCertificate));
     Assert.IsNotNullOrEmpty(xml);
 }
Ejemplo n.º 4
0
        public void SubIdDefaultsToZero()
        {
            var directoryRequest = new DirectoryRequest("ABCD", null);

            Assert.AreEqual(0, directoryRequest.MerchantSubId);
        }