Esempio n. 1
0
        private Transaction CreditVoiceAuth(decimal amount)
        {
            CreditTrackData track = TestCards.VisaSwipe();

            Transaction transaction = Transaction.FromNetwork(
                10m,
                "TYPE04",
                new NtsData(FallbackCode.None, AuthorizerCode.Voice_Authorized),
                track
                );

            ManagementBuilder builder = transaction.Capture(amount)
                                        .WithCurrency("USD");

            if (configName.Equals("NoBatch"))
            {
                builder.WithBatchNumber(batchProvider.GetBatchNumber(), batchProvider.GetSequenceNumber());
            }

            Transaction response = builder.Execute(configName);

            Assert.IsNotNull(response);
            System.Diagnostics.Debug.WriteLine("Voice Capture:");
            System.Diagnostics.Debug.WriteLine(response.HostResponseDate);
            System.Diagnostics.Debug.WriteLine(response.SystemTraceAuditNumber);
            return(response);
        }
Esempio n. 2
0
        private Transaction CreditReverse(Transaction saleToReverse, decimal amount)
        {
            ManagementBuilder builder = saleToReverse.Reverse(amount)
                                        .WithCurrency("USD");

            if (configName.Equals("NoBatch"))
            {
                builder.WithBatchNumber(batchProvider.GetBatchNumber(), batchProvider.GetSequenceNumber());
            }

            Transaction response = builder.Execute(configName);

            Assert.IsNotNull(response);
            System.Diagnostics.Debug.WriteLine("Reverse:");
            System.Diagnostics.Debug.WriteLine(response.HostResponseDate);
            System.Diagnostics.Debug.WriteLine(response.SystemTraceAuditNumber);
            return(response);
        }