Пример #1
0
        public static Payment CreateFuturePayment()
        {
            FuturePayment pay = new FuturePayment();

            pay.intent = "sale";
            CreditCard card = CreditCardTest.GetCreditCard();
            List <FundingInstrument> fundingInstruments = new List <FundingInstrument>();
            FundingInstrument        fundingInstrument  = new FundingInstrument();

            fundingInstrument.credit_card = card;
            fundingInstruments.Add(fundingInstrument);
            Payer payer = new Payer();

            payer.payment_method      = "credit_card";
            payer.funding_instruments = fundingInstruments;
            List <Transaction> transactionList = new List <Transaction>();
            Transaction        trans           = new Transaction();

            trans.amount = AmountTest.GetAmount();
            transactionList.Add(trans);
            pay.transactions = transactionList;
            pay.payer        = payer;
            Payment paymnt = pay.Create(TestingUtil.GetApiContext());

            return(paymnt);
        }
        public static FundingInstrument GetFundingInstrument()
        {
            FundingInstrument instrument = new FundingInstrument();

            instrument.credit_card = CreditCardTest.GetCreditCard();
            return(instrument);
        }