Пример #1
0
        private static void Main(string[] args)
        {
            // Create Soap Client
            CreditSoapClient soapClient = new CreditSoapClient("CreditSoap");
            // Create MerchantCredentails object
            MerchantCredentials merchantCredentials = new MerchantCredentials
            {
                MerchantName   = "TEST MERCHANT",
                MerchantSiteId = "XXXXXXXX",
                MerchantKey    = "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX"
            };
            // Create PaymentData object
            PaymentData paymentData = new PaymentData
            {
                Source = "PreviousTransaction",
                Token  = "1234567890"
            };
            // Create RefundRequest Object
            RefundRequest refundRequest = new RefundRequest
            {
                Amount                 = "1.01",
                InvoiceNumber          = "INV1234",
                CardAcceptorTerminalId = "01"
            };
            // Run Refund
            TransactionResponse45 transactionResponse45 = soapClient.Refund(merchantCredentials, paymentData, refundRequest);

            //Print Results
            Console.WriteLine("Refund Response: {0}{3} Token: {1}{3} Amount: ${2}{3}", transactionResponse45.ApprovalStatus, transactionResponse45.Token, transactionResponse45.Amount, Environment.NewLine);
            Console.WriteLine("Press Any Key to Close");
            Console.ReadKey();
        }
Пример #2
0
        private static void Main(string[] args)
        {
            // Create Soap Client
            CreditSoapClient soapClient = new CreditSoapClient("CreditSoap");
            // Create MerchantCredentails object
            MerchantCredentials merchantCredentials = new MerchantCredentials
            {
                MerchantName   = "TEST MERCHANT",
                MerchantSiteId = "XXXXXXXX",
                MerchantKey    = "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX"
            };
            // Create PaymentData object
            PaymentData paymentData = new PaymentData
            {
                Source    = "Reader",
                TrackData = "%B4012000033330026^TEST CARD/GENIUS^181210054321000000000000000 150 A?;4012000033330026=18121011000012345678?",
            };
            // Create RefundRequest Object
            RefundRequest refundRequest = new RefundRequest
            {
                Amount                 = "1.01",
                InvoiceNumber          = "INV1234",
                CardAcceptorTerminalId = "01"
            };
            // Run Refund
            TransactionResponse45 transactionResponse45 = soapClient.Refund(merchantCredentials, paymentData, refundRequest);

            // Print Results
            Console.WriteLine("Refund Response: {0} Token: {1} Amount: ${2}", transactionResponse45.ApprovalStatus, transactionResponse45.Token, transactionResponse45.Amount);
            Console.WriteLine("Press Any Key to Close");
            Console.ReadKey();
        }
Пример #3
0
        static void Main(string[] args)
        {
            //Create Soap Client
            CreditSoapClient soapClient = new CreditSoapClient("CreditSoap");
            //Create MerchantCredentails object
            MerchantCredentials merchantCredentials = new MerchantCredentials
            {
                MerchantName   = "TEST MERCHANT",
                MerchantSiteId = "XXXXXXXX",
                MerchantKey    = "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX"
            };
            //Create PaymentData object
            PaymentData paymentData = new PaymentData
            {
                Source                = "Keyed",
                CardNumber            = "4012000033330026",
                ExpirationDate        = "1220",
                CardHolder            = "John Doe",
                AvsStreetAddress      = "1 Federal St",
                AvsZipCode            = "02110",
                CardVerificationValue = "123"
            };
            //Create SaleRequest Object
            SaleRequest saleRequest = new SaleRequest
            {
                Amount                     = "1.01",
                TaxAmount                  = "0.10",
                InvoiceNumber              = "INV1234",
                CardAcceptorTerminalId     = "01",
                CustomerCode               = "1234",
                PurchaseOrderNumber        = "PO1234",
                EnablePartialAuthorization = "true",
                ForceDuplicate             = "true"
            };
            //Run Sale
            TransactionResponse45 transactionResponse45 = soapClient.Sale(merchantCredentials, paymentData, saleRequest);

            // Print Results
            Console.WriteLine("Sale Response: {0} Token: {1} Amount: ${2}", transactionResponse45.ApprovalStatus, transactionResponse45.Token, transactionResponse45.Amount);
            Console.WriteLine("Press Any Key to Close");
            Console.ReadKey();
        }
Пример #4
0
        static void Main(string[] args)
        {
            //Create Soap Client
            CreditSoapClient soapClient = new CreditSoapClient("CreditSoap");
            //Create MerchantCredentails object
            MerchantCredentials merchantCredentials = new MerchantCredentials
            {
                MerchantName   = "TEST MERCHANT",
                MerchantSiteId = "XXXXXXXX",
                MerchantKey    = "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX"
            };
            //Create PaymentData object
            PaymentData paymentData = new PaymentData
            {
                Source                = "Keyed",
                CardNumber            = "4012000033330026",
                ExpirationDate        = "1220",
                CardHolder            = "John Doe",
                AvsStreetAddress      = "1 Federal St",
                AvsZipCode            = "02110",
                CardVerificationValue = "123"
            };
            //Create RefundRequest Object
            RefundRequest refundRequest = new RefundRequest
            {
                Amount                 = "1.01",
                InvoiceNumber          = "INV1234",
                CardAcceptorTerminalId = "01"
            };
            //Run Refund
            TransactionResponse45 transactionResponse45 = soapClient.Refund(merchantCredentials, paymentData, refundRequest);

            //Print Results
            Console.WriteLine("Refund Response: {0}{3} Token: {1}{3} Amount: ${2}{3}", transactionResponse45.ApprovalStatus, transactionResponse45.Token, transactionResponse45.Amount, Environment.NewLine);
            Console.WriteLine("Press Any Key to Close");
            Console.ReadKey();
        }
Пример #5
0
        private static void Main(string[] args)
        {
            // Create Soap Client
            CreditSoapClient soapClient = new CreditSoapClient("CreditSoap");
            // Create MerchantCredentails object
            MerchantCredentials merchantCredentials = new MerchantCredentials
            {
                MerchantName   = "TEST MERCHANT",
                MerchantSiteId = "XXXXXXXX",
                MerchantKey    = "XXXXX-XXXXX-XXXXX-XXXXX-XXXXX"
            };
            // Create PaymentData object
            PaymentData paymentData = new PaymentData
            {
                Source    = "Reader",
                TrackData = "%B4012000033330026^TEST CARD/GENIUS^181210054321000000000000000 150 A?;4012000033330026=18121011000012345678?",
            };
            // Create SaleRequest Object
            SaleRequest saleRequest = new SaleRequest
            {
                Amount                     = "1.01",
                TaxAmount                  = "0.10",
                InvoiceNumber              = "INV1234",
                CardAcceptorTerminalId     = "01",
                CustomerCode               = "1234",
                PurchaseOrderNumber        = "PO1234",
                EnablePartialAuthorization = "true",
                ForceDuplicate             = "true"
            };
            // Run Sale
            TransactionResponse45 transactionResponse45 = soapClient.Sale(merchantCredentials, paymentData, saleRequest);

            // Print Results
            Console.WriteLine("Sale Response: {0} Token: {1} Amount: ${2}", transactionResponse45.ApprovalStatus, transactionResponse45.Token, transactionResponse45.Amount);
            Console.WriteLine("Press Any Key to Close");
            Console.ReadKey();
        }