public void Can_Send_Cancel_Request() { var senderId = "061133"; var merchantid = "APPDK0074110008"; var orderid = "DB TESTING 2015060908"; SoapConnection <CancelV01Client, DB.SoapLibrary.Specification.CancelV01.CancelV01> soapConnection = new SoapConnection <CancelV01Client, DB.SoapLibrary.Specification.CancelV01.CancelV01>(endpoints.CancelV01); CancelRequest req = new CancelRequest { Input = new Input { MerchantID = merchantid, OrderID = orderid, CustomerId = string.Empty, }, Security = new SecurityHeaderType(), RequestHeader = new RequestHeaderType { Language = "DA", SenderId = senderId, SignerId1 = senderId, SignerId2 = senderId, SignerId3 = senderId, DBCryptId = senderId, RequestId = "123", Timestamp = DateTime.UtcNow.DbTimestamp() } }; var output = soapConnection.Send(client => client.Cancel(ref req.Security, req.RequestHeader, req.Input)); Assert.IsNotNull(output); }
public void Can_Send_Capture_Request() { var senderId = "061133"; var merchantid = "APPDK0074110008"; var orderid = "DB TESTING 2015060908"; SoapConnection <CaptureV01Client, DB.SoapLibrary.Specification.CaptureV01.CaptureV01> soapConnection = new SoapConnection <CaptureV01Client, DB.SoapLibrary.Specification.CaptureV01.CaptureV01>(new EndpointConfiguration().CaptureV01); var req = new CaptureRequest { Input = new Input { MerchantId = merchantid, Amount = 102, OrderId = orderid, }, Security = new SecurityHeaderType(), RequestHeader = new RequestHeaderType { Language = "DA", SenderId = senderId, SignerId1 = senderId, SignerId2 = senderId, SignerId3 = senderId, DBCryptId = senderId, RequestId = "1234", Timestamp = DateTime.UtcNow.DbTimestamp() } }; var output = soapConnection.Send(client => client.Capture(ref req.Security, req.RequestHeader, req.Input)); Assert.IsNotNull(output); }
public void Can_Send_Reserve_Request() { var senderId = "061133"; var merchantid = "APPDK0074110008"; var orderid = "DB TESTING 2015060908"; decimal amount = 105; SoapConnection <ReserveV01Client, ReserveV01> soapConnection = new SoapConnection <ReserveV01Client, ReserveV01>(new EndpointConfiguration().ReserveV01); var req = new ReserveRequest { dacInput = new dacInput { MerchantId = merchantid, CustomerId = string.Empty, OrderId = orderid, CardChecksum = string.Empty, Amount = amount, MinimumAmount = amount, Partial = "N", Message = string.Empty, Test = "Y", UseDefaultCard = string.Empty, BulkRef = string.Empty, }, Security = new SecurityHeaderType(), RequestHeader = new RequestHeaderType { Language = "DA", SenderId = senderId, SignerId1 = senderId, SignerId2 = senderId, SignerId3 = senderId, DBCryptId = senderId, RequestId = "1234", Timestamp = DateTime.UtcNow.DbTimestamp() } }; var output = soapConnection.Send(client => client.Reserve(ref req.Security, req.RequestHeader, req.dacInput)); Assert.IsNotNull(output); }
public void Can_Send_RequestPayment_Request() { var senderId = "061133"; var merchantid = "APPDK0074110008"; var orderid = "DB TESTING 2015060908"; decimal amount = 105; SoapConnection <RequestPaymentV01Client, RequestPaymentV01> soapConnection = new SoapConnection <RequestPaymentV01Client, RequestPaymentV01>(new EndpointConfiguration().RequestPaymentV01); var req = new RequestPaymentRequest { dacRefund_Input = new dacRefund_Input { MerchantId = merchantid, Amount = amount, BulkRef = string.Empty, CustomerId = string.Empty, OrderId = orderid, }, Security = new SecurityHeaderType(), RequestHeader = new RequestHeaderType { Language = "DA", SenderId = senderId, SignerId1 = senderId, SignerId2 = senderId, SignerId3 = senderId, DBCryptId = senderId, RequestId = "1234", Timestamp = DateTime.UtcNow.DbTimestamp() } }; var output = soapConnection.Send(client => client.RequestPayment(ref req.Security, req.RequestHeader, req.dacRefund_Input)); Assert.IsNotNull(output); }
public void Can_Send_GetStatusRequest() { var senderId = "061133"; var merchantid = "APPDK0074110008"; var orderid = "ero2309151"; var actioncode = "B"; SoapConnection <GetStatusV02Client, GetStatusV02> soapConnection = new SoapConnection <GetStatusV02Client, GetStatusV02>(new EndpointConfiguration().GetStatusV02); GetStatusRequest req = new GetStatusRequest { dacGetStatusInput = new dacGetStatusInput { MerchantId = merchantid, OrderId = orderid, CustomerId = string.Empty, ActionCode = actioncode }, Security = new SecurityHeaderType(), RequestHeader = new RequestHeaderType { Language = "DA", SenderId = senderId, SignerId1 = senderId, SignerId2 = senderId, SignerId3 = senderId, DBCryptId = senderId, RequestId = "1234", Timestamp = DateTime.UtcNow.DbTimestamp() } }; var output = soapConnection.Send(client => client.GetStatus(ref req.Security, req.RequestHeader, req.dacGetStatusInput)); Console.Write(output); Assert.IsNotNull(output); }