/// <summary>Configure the Accordion</summary>
        private void SetupPaymentMethodDisplay()
        {
            rblPaymentOptions.Items[1].Attributes.Add(HtmlTextWriterAttribute.Style.ToString(), StyleHidden);
            rblPaymentOptions.Items[2].Attributes.Add(HtmlTextWriterAttribute.Style.ToString(), StyleHidden);
            rblPaymentOptions.Items[3].Attributes.Add(HtmlTextWriterAttribute.Style.ToString(), StyleHidden);
            _currentOption = PaymentOptionChoice.CreditCard;
            var  config        = HLConfigManager.Configurations.PaymentsConfiguration;
            bool shouldAllowCC = PaymentInfoGrid.shouldAllowCC(_cashOnly, this._hardCash, this._allowCreditCardForHardCash);

            if (_allowWirePayment)
            {
                rblPaymentOptions.Items[2].Attributes.Remove(HtmlTextWriterAttribute.Style.ToString());
                pnlWireTable.Visible = true;

                if (!shouldAllowCC)
                {
                    rblPaymentOptions.Items[0].Attributes.Add(HtmlTextWriterAttribute.Style.ToString(), StyleHidden);
                    pnlCreditTable.Visible = false;
                    _currentOption         = PaymentOptionChoice.WireTransfer;
                }
                if (config.DisablePaymentGateway)
                {
                    _currentOption = PaymentOptionChoice.WireTransfer;
                }
                SetWirePayments();
            }
            if (_allowDirectDepositPayment)
            {
                rblPaymentOptions.Items[3].Attributes.Remove(HtmlTextWriterAttribute.Style.ToString());
                pnlDirectDepositTable.Visible = true;

                if (!shouldAllowCC)
                {
                    rblPaymentOptions.Items[1].Attributes.Add(HtmlTextWriterAttribute.Style.ToString(), StyleHidden);
                    pnlCreditTable.Visible = false;
                    _currentOption         = PaymentOptionChoice.DirectDeposit;
                }

                if (config.DisablePaymentGateway)
                {
                    if (!_allowWirePayment)
                    {
                        _currentOption = PaymentOptionChoice.DirectDeposit; //rblPaymentOptions.SelectedIndex = 3;
                    }
                }
                SetDirectDepositPayments();
            }
            if (!IsPostBack)
            {
                rblPaymentOptions.SelectedIndex = mpPaymentOptions.SelectedIndex = (int)_currentOption - 1;
                if (ddlDirectDeposit.Items.Count > 0)
                {
                    ddlDirectDeposit.Items[0].Selected = true;
                }
            }
        }
        public override bool ValidateAndGetPayments(Address_V01 shippingAddress, out List <Payment> payments, bool showErrors)
        {
            bool isValid = base.ValidateAndGetPayments(shippingAddress, out payments, showErrors);

            //List<Payment> currentPayments = GetPayments(shippingAddress);
            PaymentOptionChoice currentChoice = GetCurrentPaymentOption();

            if (currentChoice == PaymentOptionChoice.CreditCard)
            {
                if (string.IsNullOrEmpty(this.txtTIN.Text))
                {
                    isValid = false;
                    lblErrorMessages.Text = GetLocalResourceObject("NoTIN") as string;
                }
                else
                {
                    var validNumber = this.IsValidTIN(this.txtTIN.Text);
                    if (!validNumber)
                    {
                        isValid = validNumber;
                        lblErrorMessages.Text = GetLocalResourceObject("NotValidTIN") as string;
                    }
                    else
                    {
                        this.SessionInfo.NationaId = string.Format("{0}", this.txtTIN.Text);
                        SessionInfo.SetSessionInfo(DistributorID, Locale, this.SessionInfo);
                    }
                }
            }

            _paymentError = !isValid;

            if (_paymentError)
            {
                OnCardAddOrEdit(null, null);
            }
            UpdatePanel1.Update();
            return(isValid);
        }