Exemple #1
0
        private void Submit(object sender, EventArgs e)
        {
            var req = new TransactionListRequest
            {
                order_id = Request.Form["order_id"],
            };
            var resp = new TransactionList().Post(req);

            if (resp.Error != null)
            {
                DataError   = resp.Error.ErrorMessage;
                DataErrorId = resp.Error.RequestId;
            }
            else
            {
                if (resp.response.Count == 0)
                {
                    DataNoList = "No transactions";
                }
                Data = resp;
            }
        }
Exemple #2
0
        static Transaction GetTransactionFromExternalId(Configuration configuration)
        {
            // Please see https://docs.transferzero.com/docs/transaction-flow/#external-id
            // for more details on external IDs

            TransactionsApi transactionsApi = new TransactionsApi(configuration);
            String          externalId      = "TRANSACTION-00001";

            TransactionListResponse transactionListResponse = transactionsApi.GetTransactions(externalId: externalId);

            if (transactionListResponse.Object.Count > 0)
            {
                System.Console.WriteLine("Transaction found");
                Transaction result = transactionListResponse.Object[0];
                System.Console.WriteLine(result);
                return(result);
            }
            else
            {
                System.Console.WriteLine("Transaction not found");
                return(null);
            }
        }