protected override void OnInit(System.EventArgs e)
        {
            base.OnInit(e);

            if (Request.QueryString["id"] != null)
            {
                this.GatewayIdField.Value = Request.QueryString["id"];
            }
            if (Request.QueryString["payid"] != null)
            {
                this.MethodIdField.Value = Request.QueryString["payid"];
            }
            //if (AvailableGateways.CurrentGateway().GatewayId == this.GatewayIdField.Value) {
            //    g = AvailableGateways.CurrentGateway();
            //}
            //else {
            List <MerchantTribe.Payment.Methods.AvailableMethod> AvailableGateways = MerchantTribe.Payment.Methods.AvailableMethod.FindAll();

            for (int i = 0; i <= AvailableGateways.Count - 1; i++)
            {
                if (string.Compare(AvailableGateways[i].Id, this.GatewayIdField.Value, true) == 0)
                {
                    g = AvailableGateways[i];
                }
            }
            //}

            LoadEditor();
        }
        protected override void OnInit(System.EventArgs e)
        {
            base.OnInit(e);

            if (Request.QueryString["id"] != null)
            {
                this.GatewayIdField.Value = Request.QueryString["id"];
            }
            if (Request.QueryString["payid"] != null)
            {
                this.MethodIdField.Value = Request.QueryString["payid"];
            }
            //if (AvailableGateways.CurrentGateway().GatewayId == this.GatewayIdField.Value) {
            //    g = AvailableGateways.CurrentGateway();
            //}
            //else {
            List<MerchantTribe.Payment.Methods.AvailableMethod> AvailableGateways = MerchantTribe.Payment.Methods.AvailableMethod.FindAll();

            for (int i = 0; i <= AvailableGateways.Count - 1; i++)
            {
                if (string.Compare(AvailableGateways[i].Id, this.GatewayIdField.Value, true) == 0)
                {
                    g = AvailableGateways[i];
                }
            }
            //}

            LoadEditor();
        }