public void test_case_14a() { _device = new PaxDevice(new ConnectionConfig { ConnectionMode = ConnectionModes.HTTP, IpAddress = "10.12.220.172", Port = "10009", DeviceId = 5569387, SiteId = 102311, LicenseId = 102308, UserName = "******", Password = "******", Url = "https://cert.api2.heartlandportico.com/Hps.Exchange.PosGateway/PosGatewayService.asmx" }); var response = _device.CreditAuth(1, 15.12m).Execute(); Assert.IsNotNull(response); Assert.AreEqual("00", response.ResponseCode); var capture = _device.CreditCapture(2, 18.12m) .WithGratuity(3m) .WithTransactionId(response.TransactionId) .Execute(); Assert.IsNotNull(capture); Assert.AreEqual("00", capture.ResponseCode); Assert.IsNotNull(capture.SubTransaction); Assert.AreEqual("00", capture.SubTransaction.ResponseCode); }
public void Auth_Capture() { _device.OnMessageSent += (message) => { Assert.IsNotNull(message); }; var response = _device.CreditAuth(1, 12m) .WithAllowDuplicates(true) .Execute(); Assert.IsNotNull(response); Assert.AreEqual("00", response.ResponseCode); var captureResponse = _device.CreditCapture(2, 12m) .WithTransactionId(response.TransactionId) .Execute(); Assert.IsNotNull(captureResponse); Assert.AreEqual("00", captureResponse.ResponseCode); }