Exemplo n.º 1
0
        public void giftCard_auth_capture()
        {
            Transaction response = giftCard.Authorize(50m, true)
                                   .WithCurrency("USD")
                                   .Execute();

            //.Execute("ICR");
            Assert.IsNotNull(response);
            System.Diagnostics.Debug.WriteLine(response.HostResponseDate);
            System.Diagnostics.Debug.WriteLine(response.SystemTraceAuditNumber);
            Assert.AreEqual("000", response.ResponseCode);

            Transaction transaction = Transaction.FromNetwork(
                50m,
                response.AuthorizationCode,
                response.NTSData,
                giftCard,
                response.MessageTypeIndicator,
                response.SystemTraceAuditNumber,
                response.OriginalTransactionTime
                );

            Transaction captureResponse = transaction.Capture(new Decimal(35.24))
                                          .WithCurrency("USD")
                                          .Execute();

            Assert.IsNotNull(captureResponse);
            System.Diagnostics.Debug.WriteLine(captureResponse.HostResponseDate);
            System.Diagnostics.Debug.WriteLine(captureResponse.SystemTraceAuditNumber);
            Assert.AreEqual("000", captureResponse.ResponseCode);
        }
Exemplo n.º 2
0
        public void value_link_card_type_test()
        {
            GiftCard card = new GiftCard();

            card.SetValue("6010567085878703=25010004000070779628");

            Transaction response = card.Authorize(new Decimal(1.00), true)
                                   .WithCurrency("USD")
                                   .Execute();

            Assert.IsNotNull(response);
            System.Diagnostics.Debug.WriteLine(response.HostResponseDate);
            System.Diagnostics.Debug.WriteLine(response.SystemTraceAuditNumber);
            Assert.AreEqual("000", response.ResponseCode);
        }