Ejemplo n.º 1
0
        public void GetTransactionsTest()
        {
            using (Tokenio.Tpp.TokenClient tokenClient = TestUtil.CreateClient())
            {
                UserMember payer      = TestUtil.CreateUserMember();
                Alias      payeeAlias = TestUtil.RandomAlias();
                TppMember  payee      = tokenClient.CreateMemberBlocking(payeeAlias);

                Account payeeAccount = payee.CreateTestBankAccountBlocking(1000, "EUR");

                Token token = TestUtil.CreateTransferToken(payer, payeeAlias);

                Transfer transfer = RedeemTransferTokenSample.RedeemTransferToken(
                    payee,
                    payeeAccount.Id(),
                    token.Id);

                string      transactionId = transfer.TransactionId;
                Transaction transaction   = payer.GetTransactionBlocking(
                    payer.GetAccountsBlocking()[0].Id(),
                    transactionId,
                    Key.Types.Level.Standard);
                Assert.Equal(transaction.TokenId, token.Id);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Illustrate Member.getTransaction
        /// </summary>
        /// <param name="payer">payer Token member</param>
        /// <param name="transfer">recently-completed transfer</param>
        /// <returns>a Transaction</returns>
        public static Transaction GetTransactionSample(
            UserMember payer,
            Transfer transfer)
        {
            List <Tokenio.User.Account> accounts = payer.GetAccountsBlocking().ToList();
            string accountId = accounts[0].Id();

            string      transactionId = transfer.TransactionId;
            Transaction transaction   = payer.GetTransactionBlocking(accountId, transactionId, Level.Standard);

            return(transaction);
        }