Exemplo n.º 1
0
        /// <summary>
        /// Redeems a standing order token to make a series of transfers from payer bank account
        /// to payee bank account.
        /// </summary>
        /// <param name="payee">payee Token member</param>
        /// <param name="tokenId">ID of the token to redeem</param>
        /// <returns>standing order submission record</returns>
        public static StandingOrderSubmission RedeemStandingOrderToken(
            UserMember payee,
            string tokenId) // ID of token to redeem
        {
            // Retrieve a standing order token to redeem.
            Token token = payee.GetTokenBlocking(tokenId);
            // Payee redeems a standing order token.
            // Money is transferred in many installments to a payee bank account.
            StandingOrderSubmission submission = payee.RedeemStandingOrderTokenBlocking(token.Id);

            return(submission);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Redeems a transfer token to transfer money from payer bank account to payee bank account.
        /// </summary>
        /// <param name="payee">payee Token member</param>
        /// <param name="tokenId">ID of the token to redeem</param>
        /// <returns>a transfer Transfer</returns>
        public static StandingOrderSubmission RedeemStandingOrderToken(
            TppMember payee,
            string tokenId)
        {
            // Retrieve a transfer token to redeem.
            Token standingOrderToken = payee.GetTokenBlocking(tokenId);

            // Payee redeems a standing order token.
            // Money is transferred to a payee bank account.
            StandingOrderSubmission submission = payee.RedeemStandingOrderTokenBlocking(
                standingOrderToken.Id);

            return(submission);
        }
Exemplo n.º 3
0
 public void RedeemStandingOrderTokenTest()
 {
     using (var tokenClient = TestUtil.CreateClient())
     {
         UserMember payer        = TestUtil.CreateMemberAndLinkAccounts(tokenClient);
         Alias      payeeAlias   = TestUtil.RandomAlias();
         UserMember payee        = tokenClient.CreateMemberBlocking(payeeAlias);
         Account    payeeAccount = payee.CreateTestBankAccountBlocking(1000, "EUR");
         Token      token        =
             CreateStandingOrderTokenSample.CreateStandingOrderToken(payer, payeeAlias, Level.Standard);
         StandingOrderSubmission submission = RedeemStandingOrderTokenSample
                                              .RedeemStandingOrderToken(payee, token.Id);
         Assert.NotNull(submission);
     }
 }