Esempio n. 1
0
        public static request.Credit.AuthorizationCompletion sampleCreditAuthorizationCompletion(string transactionID)
        {
            request.Credit.AuthorizationCompletion authorizationCompletionRequest = new request.Credit.AuthorizationCompletion();

            Credentials credentials = new Credentials();

            credentials.AcceptorID = "1147003";
            authorizationCompletionRequest.Credentials = credentials;

            Reports reports = new Reports();

            reports.ReportGroup = "1243";
            authorizationCompletionRequest.Reports = reports;

            Transaction transaction = new Transaction();

            transaction.TransactionID = transactionID;
            authorizationCompletionRequest.Transaction = transaction;

            Application application = new Application();

            application.ApplicationID = "1234";
            authorizationCompletionRequest.Application = application;

            return(authorizationCompletionRequest);
        }
Esempio n. 2
0
        public static string sampleCreditAuthorizationCompletion()
        {
            request.Credit.Authorization authorization = SampleRequests.sampleCreditAuthorization();
            string response      = authorization.send();
            string transactionID = Utilities.getTransactionID(response);

            if (transactionID != null)
            {
                request.Credit.AuthorizationCompletion authorizationCompletion = SampleRequests.sampleCreditAuthorizationCompletion(transactionID);
                response = authorizationCompletion.send();
                return(response);
            }
            System.Console.WriteLine("Authorization failed. Cannot perform Authorization Completion transaction");
            return(null);
        }