Пример #1
0
 /// <summary>
 /// Setup the control to show the initial screen
 /// </summary>
 private void Initialize()
 {
     _sendMoneyHelper = new SendMoneyHelper(GetResource("MerchantId"), true, GetResource("AppKey"), GetResource("AppSecret"), GetResource("RedirectUri"));
     UcSendMoney.SendMoneyCompleted += SendMoneyComplete;
     UcSendMoney.CancelSendMoney    += CloseSendMoney;
     SetLoginStatus();
 }
        /// <summary>
        /// Initializes the Send Money user control to be ready to process the Dwolla payment
        /// </summary>
        /// <param name="sendMoneyHelper">The current instance of the SendMoneyHelper class</param>
        /// <param name="amount">The amount to charge</param>
        public void Initialize(SendMoneyHelper sendMoneyHelper, double amount)
        {
            _sendMoneyHelper = sendMoneyHelper;
            _amount          = amount;
            TxtAmount.Text   = amount.ToString("C2");

            InitSteps();
            LoadMerchantInfo();
            LoadFundsSource();
            LoadBalance();
        }