public static request.Credit.Void sampleCreditVoid(string transactionID) { request.Credit.Void voidRequest = new request.Credit.Void(); Credentials credentials = new Credentials(); credentials.AcceptorID = "1147003"; voidRequest.Credentials = credentials; Reports reports = new Reports(); reports.ReportGroup = "1243"; voidRequest.Reports = reports; Transaction transaction = new Transaction(); transaction.TransactionID = transactionID; voidRequest.Transaction = transaction; Application application = new Application(); application.ApplicationID = "1234"; voidRequest.Application = application; return(voidRequest); }
public static string sampleCreditVoid() { request.Credit.Sale sale = SampleRequests.sampleCreditSale(); string response = sale.send(); string transactionID = Utilities.getTransactionID(response); if (transactionID != null) { request.Credit.Void void_ = SampleRequests.sampleCreditVoid(transactionID); response = void_.send(); return(response); } System.Console.WriteLine("Sale failed. Cannot perform Void transaction"); return(null); }