public void CallingForm(MerchantProfile merchantProfile, bool blnNewProfile, BankcardService bcs, ElectronicCheckingService ecks, StoredValueService svas, string serviceId, DataGenerator dg)
        {
            _bcs          = bcs;
            _ecks         = ecks;
            _svas         = svas;
            _strServiceID = serviceId;
            _dg           = dg;

            hideAllFields();
            //Since MerchantProfile is saved at the serviceId level, display serviceId.
            //txtMerchantProfileServiceId.Text = merchantProfile.ServiceId;

            if (serviceId.Length < 1)
            {
                txtMerchantProfileServiceId.Text = "ServiceId not selected in calling form";
            }
            else
            {
                txtMerchantProfileServiceId.Text = serviceId;
            }

            //Populate combo boxes with the Enumeration
            cboCountryCode.Sorted       = true;
            cboCountryCode.DataSource   = Enum.GetValues(typeof(TypeISOCountryCodeA3));
            cboCountryCode.SelectedItem = TypeISOCountryCodeA3.NotSet;

            cboLanguage.Sorted       = true;
            cboLanguage.DataSource   = Enum.GetValues(typeof(TypeISOLanguageCodeA3));
            cboLanguage.SelectedItem = TypeISOLanguageCodeA3.NotSet;

            cboCurrencyCode.Sorted       = true;
            cboCurrencyCode.DataSource   = Enum.GetValues(typeof(TypeISOCurrencyCodeA3));
            cboCurrencyCode.SelectedItem = TypeISOCurrencyCodeA3.NotSet;


            cboCustomerPresent.Sorted       = true;
            cboCustomerPresent.DataSource   = Enum.GetValues(typeof(CustomerPresent));
            cboCustomerPresent.SelectedItem = CustomerPresent.NotSet;

            cboRequestACI.Sorted       = true;
            cboRequestACI.DataSource   = Enum.GetValues(typeof(RequestACI));
            cboRequestACI.SelectedItem = RequestACI.IsCPSMeritCapable;

            cboEntryMode.Sorted       = true;
            cboEntryMode.DataSource   = Enum.GetValues(typeof(EntryMode));
            cboEntryMode.SelectedItem = EntryMode.NotSet;

            cboMerchantIndustryType.Sorted       = true;
            cboMerchantIndustryType.DataSource   = Enum.GetValues(typeof(IndustryType));
            cboMerchantIndustryType.SelectedItem = IndustryType.NotSet;

            if (_bcs != null)
            {
                if (_strServiceID == "C82ED00001" || _strServiceID == "71C8700001" ||
                    _strServiceID == "88D9300001" || _strServiceID == "B447F00001" ||
                    _strServiceID == "D806000001" || _strServiceID == "E88FD00001")
                {
                    showBCPExpandedFields();
                }
                else if (_strServiceID == "168511300C" || _strServiceID == "9999999999")
                {
                    showBCPExpandedFields();
                }
                else
                {
                    showBCPFields();
                }
            }

            if (_ecks != null)
            {
                showECKFields();
            }
            if (_svas != null)
            {
                showSVAFields();
            }
        }
        private void cboAvailableServices_SelectedIndexChanged(object sender, EventArgs e)
        {
            bool blnMatch = false;
            Item item = (Item)cboAvailableServices.SelectedItem;
            Helper.ServiceID = item.Value1;
            if (!_blnPersistedConfigExists)
                Helper.MerchantProfileId = "";

            CboWorkFlowIdsByServiceId.Items.Clear();
            CboWorkFlowIdsByServiceId.Text = "";

            txtAboutTheService.Text = "";

            //Note : Since the sample application only show one class or the other, reset to null and initialize below.
            _bcs = null;
            _ecks = null;
            _svas = null;
            
            #region BankcardService
            if (_si.BankcardServices != null)
            {
                foreach (BankcardService BCS in _si.BankcardServices)
                {
                    if (BCS.ServiceId == Helper.ServiceID)
                    {
                        _bcs = BCS; //Set the BankCard Service to be used

                        SupportedTxnTypes = BCS.Operations;
                        //Toggle the buttons to match supported transaction types.
                        if (!AvailableTxnTypes(SupportedTxnTypes))
                        {
                            MessageBox.Show("This Service is not supported with CWS");
                            return;
                        }

                        blnMatch = true;

                        // Determine if it's possible to send more than one capture             
                        if (BCS.MultiplePartialCapture)
                            ChkMultiplePartialCapture.Enabled = true;

                        txtAboutTheService.Text = "ServiceId : " + BCS.ServiceId
                                                  //Unique identifier for available services. These values change from sandbox to production.
                                                  + "\r\nService Name : " + Helper.TranslateServiceIdToFriendlyName(BCS)
                                                  + "\r\nAlternative Merchant Data : " + BCS.AlternativeMerchantData
                                                  //Indicates whether the service supports the display of AlternativeMerchantData on accountholder statements. Subject to issuer discretion.
                                                  + "\r\nAutoSettle Supported : " + BCS.AutoBatch
                                                  //Indicates whether AutoBatch is supported.
                                                  + "\r\n\r\nAVSData Fields Required: "
                                                  + "\r\n - CardHolderName: " + BCS.AVSData.CardholderName
                                                  + "\r\n - Street: " + BCS.AVSData.Street
                                                  + "\r\n - City: " + BCS.AVSData.City
                                                  + "\r\n - State: " + BCS.AVSData.StateProvince
                                                  + "\r\n - PostalCode: " + BCS.AVSData.PostalCode
                                                  + "\r\n - Phone: " + BCS.AVSData.Phone
                                                  + "\r\n - Country: " + BCS.AVSData.Country
                                                  + "\r\nCutoffTime : " + BCS.CutoffTime
                                                  //If the service supports AutoBatch, this is the cutoff time for new transactions to be included in the daily automated batch. 
                                                  //+ "\r\nEncryptionKey : " + BCS.EncryptionKey //Public key used for encrypting payment account data.
                                                  + "\r\nManagedBilling : " + BCS.ManagedBilling
                                                  //Indicates whether the service supports Service Provider managed billing.
                                                  + "\r\nMaximumBatchItems : " + BCS.MaximumBatchItems
                                                  //Maximum number of items included in a single batch.
                                                  + "\r\nMaximumLineItems : " + BCS.MaximumLineItems
                                                  //Maximum number of line items that may be provided when providing Level 3 line item data.
                                                  + "\r\nMultiplePartialCapture : " + BCS.MultiplePartialCapture
                                                  //Indicates whether the service supports multiple partial captures of a single authorization.
                                                  + "\r\n\r\nOperations Supported:"
                                                  //Specifies which operations are supported for the service.
                                                  + "\r\n - Adjust : " + BCS.Operations.Adjust
                                                  + "\r\n - AuthAndCapture : " + BCS.Operations.AuthAndCapture
                                                  + "\r\n - Authorize : " + BCS.Operations.Authorize
                                                  + "\r\n - Capture : " + BCS.Operations.Capture
                                                  + "\r\n - CaptureAll : " + BCS.Operations.CaptureAll
                                                  + "\r\n - CaptureSelective : " + BCS.Operations.CaptureSelective
                                                  + "\r\n - CloseBatch : " + BCS.Operations.CloseBatch
                                                  + "\r\n - QueryAccount : " + BCS.Operations.QueryAccount
                                                  + "\r\n - ReturnById : " + BCS.Operations.ReturnById
                                                  + "\r\n - ReturnUnlinked : " + BCS.Operations.ReturnUnlinked
                                                  + "\r\n - Undo : " + BCS.Operations.Undo
                                                  + "\r\n - Verify : " + BCS.Operations.Verify
                                                  + "\r\nPurchaseCardLevel : " + BCS.PurchaseCardLevel
                                                  //Specifies highest level of purchase card support. Level 3 support implies support for Level 2 as well.
                                                  + "\r\n\r\nTender Information:"
                                                  //Contains specific information about the supported payment tenders.
                                                  + "\r\n - BatchAssignmentSupport : " +
                                                  BCS.Tenders.BatchAssignmentSupport
                                                  //Indicates level of BatchAssignment supported by the service. Required.
                                                  + "\r\n - Credit : " + BCS.Tenders.Credit
                                                  //Indicates support for the Credit Card tender. Required.
                                                  + "\r\n - CreditAuthorizeSupport : " +
                                                  BCS.Tenders.CreditAuthorizeSupport
                                                  //Indicates the level of credit authorization support on a service. Required. Maps to the CreditAuthorizeSupportType enumeration.
                                                  + "\r\n - PINDebit : " + BCS.Tenders.PINDebit
                                                  //Indicates support for the PIN Debit tender. Required.
                                                  + "\r\n - PINDebitReturnSupportType : " +
                                                  BCS.Tenders.PINDebitReturnSupportType
                                                  //Indicates if Return is supported by the service for PIN Debit transactions. Required. Maps to the PinDebitReturnSupportType enumeration. Defaults to 'Standalone'.
                                                  + "\r\n - PinDebitUndoSupport : " + BCS.Tenders.PinDebitUndoSupport
                                                  //Indicates if Undo is supported by the service for PIN Debit transactions. Required. Maps to the PINDebitUndoSupportType enumeration.
                                                  + "\r\n - PINDebitUndoTenderDataRequired : " +
                                                  BCS.Tenders.PINDebitUndoTenderDataRequired
                                                  //Specifies whether a new card swipe is required when performing an Undo on a PIN Debit card. Required.
                                                  + "\r\n - PINlessDebit : " + BCS.Tenders.PINlessDebit
                                                  //Indicates support for PINless Debit. Required.
                                                  + "\r\n - QueryRejectedSupport : " + BCS.Tenders.QueryRejectedSupport
                            //Indicates if date ranges are supported for QueryRejected on a service. Required. Maps to the QueryRejectedSupportType enumeration.
                            ;

                        //show the arrow to indicate service information
                        picArrow.Visible = true;
                        tmrServiceArrow.Interval = 2000;
                        tmrServiceArrow.Start();
                        tmrServiceArrow.Enabled = true;
                        tmrServiceArrow.Tick += new EventHandler(OnTimedEvent);

                        //Enable Purchase Card buttons depending on the Servie returned
                        if (BCS.PurchaseCardLevel == PurchaseCardLevel.Level2)
                        {
                            cmdPurchaseCardL2.Enabled = true;
                            chkL2AuthAndCapture.Enabled = true;
                            cmdPurchaseCardL3.Enabled = false;
                            chkL3AuthAndCapture.Enabled = false;
                        }
                        if (BCS.PurchaseCardLevel == PurchaseCardLevel.Level3)
                        {
                            cmdPurchaseCardL2.Enabled = true;
                            chkL2AuthAndCapture.Enabled = true;
                            cmdPurchaseCardL3.Enabled = true;
                            chkL3AuthAndCapture.Enabled = true;
                        }

                        //Check to see if AuthorizeAndCapture supported
                        ChkMagensaAuthorizeAndCapture.Enabled = (BCS.Tenders.CreditAuthorizeSupport == CreditAuthorizeSupportType.Both ? true : false);

                        //Check to see if PINDebit supported
                        chkProcessAsPINDebitTxn.Enabled = (BCS.Tenders.PINDebit ? true : false);

                        //Check to see if PINLess Debit supported
                        ChkProcessAsPINLessDebit.Enabled = (BCS.Tenders.PINlessDebit ? true : false);
                        
                        //Some service providers require Username and Password.
                        if (Helper.CredentialRequired())
                        {
                            txtCredUserName.Enabled = true;
                            txtCredPassword.Enabled = true;
                        }
                        else
                        {
                            txtCredUserName.Enabled = false;
                            txtCredPassword.Enabled = false;
                        }

                        //We now have something to persiste
                        cmdPersistConfig.Enabled = true;
                        cmdDeletePersistCached.Enabled = true;

                        //List the current service selected
                        if (Helper.ServiceID.Length > 0)
                        {
                            lblCurrentService.Text = @"Processing as Service : " +
                                                     Helper.TranslateServiceIdToFriendlyName(BCS) + @" - " +
                                                     BCS.ServiceId;
                            lblCurrentServiceClass.Text = @"Service Class : BCP - Bank Card Processing";
                        }
                    }
                }
            }

            #endregion END BankcardService

            #region ElectronicCheckingService
            if (_si.ElectronicCheckingServices != null)
            {
                foreach (ElectronicCheckingService ECKS in _si.ElectronicCheckingServices)
                {
                    if (ECKS.ServiceId == Helper.ServiceID)
                    {
                        _ecks = ECKS; //Set the BankCard Service to be used

                        SupportedTxnTypes = ECKS.Operations;
                        //Toggle the buttons to match supported transaction types.
                        if (!AvailableTxnTypes(SupportedTxnTypes))
                        {
                            MessageBox.Show("This Service is not supported with CWS");
                            return;
                        }

                        blnMatch = true;

                        txtAboutTheService.Text = "ServiceId : " + ECKS.ServiceId
                                                  //Unique identifier for available services. These values change from sandbox to production.
                                                  + "\r\nService Name : " +
                                                  Helper.TranslateServiceIdToFriendlyName(ECKS)
                                                  //Operations Supported
                                                  + "\r\n\r\nOperations Supported:"
                                                  //Specifies which operations are supported for the service.
                                                  + "\r\n - Adjust : " + ECKS.Operations.Adjust
                                                  + "\r\n - AuthAndCapture : " + ECKS.Operations.AuthAndCapture
                                                  + "\r\n - Authorize : " + ECKS.Operations.Authorize
                                                  + "\r\n - Capture : " + ECKS.Operations.Capture
                                                  + "\r\n - CaptureAll : " + ECKS.Operations.CaptureAll
                                                  + "\r\n - CaptureSelective : " + ECKS.Operations.CaptureSelective
                                                  + "\r\n - CloseBatch : " + ECKS.Operations.CloseBatch
                                                  + "\r\n - QueryAccount : " + ECKS.Operations.QueryAccount
                                                  + "\r\n - ReturnById : " + ECKS.Operations.ReturnById
                                                  + "\r\n - ReturnUnlinked : " + ECKS.Operations.ReturnUnlinked
                                                  + "\r\n - Undo : " + ECKS.Operations.Undo
                                                  + "\r\n - Verify : " + ECKS.Operations.Verify
                                                  + "\r\n\r\nTender Information:"
                                                  //Contains specific information about the supported payment tenders.
                                                  + "\r\n - BatchAssignmentSupport : " +
                                                  ECKS.Tenders.BatchAssignmentSupport
                                                  //Indicates level of BatchAssignment supported by the service. Required.
                                                  + "\r\n - Credit : " + ECKS.Tenders.Credit
                                                  //Indicates support for the Credit Card tender. Required.
                                                  + "\r\n - CreditAuthorizeSupport : " +
                                                  ECKS.Tenders.CreditAuthorizeSupport
                                                  //Indicates the level of credit authorization support on a service. Required. Maps to the CreditAuthorizeSupportType enumeration.
                                                  + "\r\n - PINDebit : " + ECKS.Tenders.PINDebit
                                                  //Indicates support for the PIN Debit tender. Required.
                                                  + "\r\n - PINDebitReturnSupportType : " +
                                                  ECKS.Tenders.PINDebitReturnSupportType
                                                  //Indicates if Return is supported by the service for PIN Debit transactions. Required. Maps to the PinDebitReturnSupportType enumeration. Defaults to 'Standalone'.
                                                  + "\r\n - PinDebitUndoSupport : " + ECKS.Tenders.PinDebitUndoSupport
                                                  //Indicates if Undo is supported by the service for PIN Debit transactions. Required. Maps to the PINDebitUndoSupportType enumeration.
                                                  + "\r\n - PINDebitUndoTenderDataRequired : " +
                                                  ECKS.Tenders.PINDebitUndoTenderDataRequired
                                                  //Specifies whether a new card swipe is required when performing an Undo on a PIN Debit card. Required.
                                                  + "\r\n - PINlessDebit : " + ECKS.Tenders.PINlessDebit
                                                  //Indicates support for PINless Debit. Required.
                                                  + "\r\n - QueryRejectedSupport : " + ECKS.Tenders.QueryRejectedSupport
                            //Indicates if date ranges are supported for QueryRejected on a service. Required. Maps to the QueryRejectedSupportType enumeration.
                            ;

                        //show the arrow to indicate service information
                        picArrow.Visible = true;
                        tmrServiceArrow.Interval = 2000;
                        tmrServiceArrow.Start();
                        tmrServiceArrow.Enabled = true;
                        tmrServiceArrow.Tick += new EventHandler(OnTimedEvent);

                        //Some service providers require Username and Password.
                        if (Helper.CredentialRequired())
                        {
                            txtCredUserName.Enabled = true;
                            txtCredPassword.Enabled = true;
                        }
                        else
                        {
                            txtCredUserName.Enabled = false;
                            txtCredPassword.Enabled = false;
                        }

                        //We now have something to persiste
                        cmdPersistConfig.Enabled = true;
                        cmdDeletePersistCached.Enabled = true;

                        //List the current service selected
                        if (Helper.ServiceID.Length > 0)
                        {
                            lblCurrentService.Text = @"Processing as Service : " +
                                                     Helper.TranslateServiceIdToFriendlyName(ECKS) + @" - " +
                                                     ECKS.ServiceId;
                            lblCurrentServiceClass.Text = @"Service Class : ECK - Electronic Check Processing";
                        }
                    }
                }
            }

            #endregion END ElectronicCheckingService

            #region StoredValueService
            if (_si.StoredValueServices != null)
            {
                foreach (StoredValueService SVAS in _si.StoredValueServices)
                {
                    if (SVAS.ServiceId == Helper.ServiceID)
                    {
                        _svas = SVAS; //Set the Stored Value Service to be used

                        SupportedTxnTypes = SVAS.Operations;
                        //Toggle the buttons to match supported transaction types.
                        if (!AvailableTxnTypes(SupportedTxnTypes))
                        {
                            MessageBox.Show("This Service is not supported with CWS");
                            return;
                        }

                        blnMatch = true;

                        txtAboutTheService.Text = "ServiceId : " + SVAS.ServiceId
                                                  //Unique identifier for available services. These values change from sandbox to production.
                                                  + "\r\nService Name : " +
                                                  Helper.TranslateServiceIdToFriendlyName(SVAS)
                                                  //Operations Supported
                                                  + "\r\n\r\nOperations Supported:"
                                                  //Specifies which operations are supported for the service.
                                                  + "\r\n - Adjust : " + SVAS.Operations.Adjust
                                                  + "\r\n - AuthAndCapture : " + SVAS.Operations.AuthAndCapture
                                                  + "\r\n - Authorize : " + SVAS.Operations.Authorize
                                                  + "\r\n - Capture : " + SVAS.Operations.Capture
                                                  + "\r\n - CaptureAll : " + SVAS.Operations.CaptureAll
                                                  + "\r\n - CaptureSelective : " + SVAS.Operations.CaptureSelective
                                                  + "\r\n - CloseBatch : " + SVAS.Operations.CloseBatch
                                                  + "\r\n - QueryAccount : " + SVAS.Operations.QueryAccount
                                                  + "\r\n - ReturnById : " + SVAS.Operations.ReturnById
                                                  + "\r\n - ReturnUnlinked : " + SVAS.Operations.ReturnUnlinked
                                                  + "\r\n - Undo : " + SVAS.Operations.Undo
                                                  + "\r\n - Verify : " + SVAS.Operations.Verify
                                                  + "\r\n\r\nTender Information:"
                                                  //Contains specific information about the supported payment tenders.
                                                  + "\r\n - BatchAssignmentSupport : " +
                                                  SVAS.Tenders.BatchAssignmentSupport
                                                  //Indicates level of BatchAssignment supported by the service. Required.
                                                  + "\r\n - Credit : " + SVAS.Tenders.Credit
                                                  //Indicates support for the Credit Card tender. Required.
                                                  + "\r\n - CreditAuthorizeSupport : " +
                                                  SVAS.Tenders.CreditAuthorizeSupport
                                                  //Indicates the level of credit authorization support on a service. Required. Maps to the CreditAuthorizeSupportType enumeration.
                                                  + "\r\n - PINDebit : " + SVAS.Tenders.PINDebit
                                                  //Indicates support for the PIN Debit tender. Required.
                                                  + "\r\n - PINDebitReturnSupportType : " +
                                                  SVAS.Tenders.PINDebitReturnSupportType
                                                  //Indicates if Return is supported by the service for PIN Debit transactions. Required. Maps to the PinDebitReturnSupportType enumeration. Defaults to 'Standalone'.
                                                  + "\r\n - PinDebitUndoSupport : " + SVAS.Tenders.PinDebitUndoSupport
                                                  //Indicates if Undo is supported by the service for PIN Debit transactions. Required. Maps to the PINDebitUndoSupportType enumeration.
                                                  + "\r\n - PINDebitUndoTenderDataRequired : " +
                                                  SVAS.Tenders.PINDebitUndoTenderDataRequired
                                                  //Specifies whether a new card swipe is required when performing an Undo on a PIN Debit card. Required.
                                                  + "\r\n - PINlessDebit : " + SVAS.Tenders.PINlessDebit
                                                  //Indicates support for PINless Debit. Required.
                                                  + "\r\n - QueryRejectedSupport : " + SVAS.Tenders.QueryRejectedSupport
                            //Indicates if date ranges are supported for QueryRejected on a service. Required. Maps to the QueryRejectedSupportType enumeration.
                            ;

                        //show the arrow to indicate service information
                        picArrow.Visible = true;
                        tmrServiceArrow.Interval = 2000;
                        tmrServiceArrow.Start();
                        tmrServiceArrow.Enabled = true;
                        tmrServiceArrow.Tick += new EventHandler(OnTimedEvent);

                        //Some service providers require Username and Password.
                        if (Helper.CredentialRequired())
                        {
                            txtCredUserName.Enabled = true;
                            txtCredPassword.Enabled = true;
                        }
                        else
                        {
                            txtCredUserName.Enabled = false;
                            txtCredPassword.Enabled = false;
                        }

                        //We now have something to persiste
                        cmdPersistConfig.Enabled = true;
                        cmdDeletePersistCached.Enabled = true;

                        //List the current service selected
                        if (Helper.ServiceID.Length > 0)
                        {
                            lblCurrentService.Text = @"Processing as Service : " +
                                                     Helper.TranslateServiceIdToFriendlyName(SVAS) + @" - " +
                                                     SVAS.ServiceId;
                            lblCurrentServiceClass.Text = @"Service Class : SVA - Stored Value Processing";
                        }
                    }
                }
            }

            #endregion END StoredValueService

            #region WorkflowId
            foreach (Workflow WF in _si.Workflows)
            {
                if (WF.ServiceId == Helper.ServiceID)
                {
                    //CboWorkFlowIdsByServiceId
                    CboWorkFlowIdsByServiceId.Items.Add(new Item("["+ WF.WorkflowId + "] " + WF.Name, WF.WorkflowId, ""));
                    //CboWorkFlowIds.Items.Add(new item("[" + node["WorkflowId"].InnerText + "] " + node["Name"].InnerXml, node["WorkflowId"].InnerText));
                }
            }
            #endregion END WorkflowId


            //List the current service selected
            if (Helper.ServiceID.Length > 0 && _bcs != null)
            {
                lblCurrentService.Text = @"Processing as Service : " + Helper.TranslateServiceIdToFriendlyName(_bcs) + @" - " + _bcs.ServiceId;
            }
            if (Helper.ServiceID.Length > 0 && _ecks != null)
            {
                lblCurrentService.Text = @"Processing as Service : " + Helper.TranslateServiceIdToFriendlyName(_ecks) + @" - " + _ecks.ServiceId;
            }
            GetMerchantProfileIds();
            cmdAddNewProfile.Enabled = true; //At this point we have valid profiles to update
            
            if (!blnMatch) MessageBox.Show(@"ServiceId did not contain a match");
        }
        public string TranslateServiceIdToFriendlyName(ElectronicCheckingService electronicCheckingService)
        {
            //Sandbox
            if (electronicCheckingService.ServiceId == "35A7700001") return "Affirmative ACH Now";

            //Production
            if (electronicCheckingService.ServiceId == "DF29D1300C") return "Affirmative ACH Now";

            return electronicCheckingService.ServiceName;//Match was not found so pass back the name in the service.
        }
        private void GetServiceInformation()
        {
            //Clean up any previous retrievals
            cboAvailableServices.Items.Clear();//Reset The Services Dropdown
            cboAvailableServices.Text = "";

            CboWorkFlowIdsByServiceId.Items.Clear();//Reset The Workflow Dropdown
            CboWorkFlowIdsByServiceId.Text = "";

            if(!_blnPersistedConfigExists)
                Helper.ServiceID = "";
            cboAvailableProfiles.Items.Clear();//Reset The Profiles Dropdown
            cboAvailableProfiles.Text = "";
            if (!_blnPersistedConfigExists) 
                Helper.MerchantProfileId = "";
            lblIsProfileInitialized.Text = "";
            txtAboutTheService.Text = "";

            //Reset previously selected services
            _bcs = null;
            _ecks = null;
            _svas = null;

            //The GetServiceInformation() operation provides information about the services that are available to a specific Service Key. 
            //This operation should be automatically invoked during initial application configuration, and manually by an application 
            //administrator if/when available services are updated.

            _si = Helper.Cwssic.GetServiceInformation(Helper.SessionToken);
            
            if (_si.BankcardServices != null)
            {
                foreach (BankcardService BCS in _si.BankcardServices)
                {
                    cboAvailableServices.Items.Add(new Item(BCS.ServiceId + "-BCS-" + Helper.TranslateServiceIdToFriendlyName(BCS), BCS.ServiceId, ""));
                }
            }
            if (_si.ElectronicCheckingServices != null)
            {
                foreach (ElectronicCheckingService ECKS in _si.ElectronicCheckingServices)
                {
                    cboAvailableServices.Items.Add(new Item(ECKS.ServiceId + "-ECK-" + Helper.TranslateServiceIdToFriendlyName(ECKS), ECKS.ServiceId, ""));
                }
            }
            if (_si.StoredValueServices != null)
            {
                foreach (StoredValueService SVAS in _si.StoredValueServices)
                {
                    cboAvailableServices.Items.Add(new Item(SVAS.ServiceId + "-SVAS-" + Helper.TranslateServiceIdToFriendlyName(SVAS), SVAS.ServiceId, ""));
                }
            }
            txtPersistedAndCached.Text = "ApplicationProfileId : " + Helper.ApplicationProfileId + "\r\nServiceId : " + Helper.ServiceID + "\r\nMerchantProfileId : " + Helper.MerchantProfileId;
        }
        public void CallingForm(MerchantProfile merchantProfile, bool blnNewProfile, BankcardService bcs, ElectronicCheckingService ecks, StoredValueService svas, string serviceId)
        {
            _bcs = bcs;
            _ecks = ecks;
            _svas = svas;
            _strServiceID = serviceId;

            hideAllFields();
            //Since MerchantProfile is saved at the serviceId level, display serviceId.
            txtMerchantProfileServiceId.Text = merchantProfile.ServiceId;
            
            if(blnNewProfile)
            {//New profile to add to CWS
                cmdAddUpdate.Text = "Add";

                //Populate combo boxes with the Enumeration
                cboCountryCode.Sorted = true;
                cboCountryCode.DataSource = Enum.GetValues(typeof(TypeISOCountryCodeA3));
                cboCountryCode.SelectedItem = TypeISOCountryCodeA3.NotSet;

                cboLanguage.Sorted = true;
                cboLanguage.DataSource = Enum.GetValues(typeof(TypeISOLanguageCodeA3));
                cboLanguage.SelectedItem = TypeISOLanguageCodeA3.NotSet;

                cboCurrencyCode.Sorted = true;
                cboCurrencyCode.DataSource = Enum.GetValues(typeof(TypeISOCurrencyCodeA3));
                cboCurrencyCode.SelectedItem = TypeISOCurrencyCodeA3.NotSet;


                cboCustomerPresent.Sorted = true;
                cboCustomerPresent.DataSource = Enum.GetValues(typeof(CustomerPresent));
                cboCustomerPresent.SelectedItem = CustomerPresent.NotSet;

                cboRequestACI.Sorted = true;
                cboRequestACI.DataSource = Enum.GetValues(typeof(RequestACI));
                cboRequestACI.SelectedItem = RequestACI.IsCPSMeritCapable;

                cboEntryMode.Sorted = true;
                cboEntryMode.DataSource = Enum.GetValues(typeof(EntryMode));
                cboEntryMode.SelectedItem = EntryMode.NotSet;

                cboMerchantIndustryType.Sorted = true;
                cboMerchantIndustryType.DataSource = Enum.GetValues(typeof(IndustryType));
                cboMerchantIndustryType.SelectedItem = IndustryType.NotSet;
            }
            else
            {//Existing Profile to Update;
                //Note : items commented out are not use so no need to wire up a text box as well as add to 'SaveMerchantInformation()'
                txtProfileId.Text = merchantProfile.ProfileId;
                txtProfileId.ReadOnly = true;
                lblLastUpdated.Text = "Last Updated : " + merchantProfile.LastUpdated;
                //MerchantData
                //MerchantData.Address
                txtCity.Text = merchantProfile.MerchantData.Address.City;
                txtPostalCode.Text = merchantProfile.MerchantData.Address.PostalCode;
                txtStateProvince.Text = merchantProfile.MerchantData.Address.StateProvince.ToString();
                txtStreetAddress1.Text = merchantProfile.MerchantData.Address.Street1;
                txtStreetAddress2.Text = merchantProfile.MerchantData.Address.Street2;

                txtCustomerServiceInternet.Text = merchantProfile.MerchantData.CustomerServiceInternet;
                txtCustomerServicePhone.Text = merchantProfile.MerchantData.CustomerServicePhone;
                txtMerchantId.Text = merchantProfile.MerchantData.MerchantId;
                txtName.Text = merchantProfile.MerchantData.Name;
                txtPhone.Text = merchantProfile.MerchantData.Phone;
                txtTaxId.Text = merchantProfile.MerchantData.TaxId;
                if (_bcs != null)
                {
		                //MerchantData.BankcardMerchantData
		                txtABANumber.Text = merchantProfile.MerchantData.BankcardMerchantData.ABANumber;
		                txtAcquirerBIN.Text = merchantProfile.MerchantData.BankcardMerchantData.AcquirerBIN;
		                txtAgentBank.Text = merchantProfile.MerchantData.BankcardMerchantData.AgentBank;
		                txtAgentChain.Text = merchantProfile.MerchantData.BankcardMerchantData.AgentChain;
		                txtClientNum.Text = merchantProfile.MerchantData.BankcardMerchantData.ClientNumber;
		                txtLocation.Text = merchantProfile.MerchantData.BankcardMerchantData.Location;
		                //txtTBD.Text = _MerchantProfile.MerchantData.BankcardMerchantData.PrintCustomerServicePhone == "";
		                txtSecondaryTerminalId.Text = merchantProfile.MerchantData.BankcardMerchantData.SecondaryTerminalId;
		                txtSettlementAgent.Text = merchantProfile.MerchantData.BankcardMerchantData.SettlementAgent;
		                txtSharingGroup.Text = merchantProfile.MerchantData.BankcardMerchantData.SharingGroup;
		                txtSIC.Text = merchantProfile.MerchantData.BankcardMerchantData.SIC;
		                txtStoreId.Text = merchantProfile.MerchantData.BankcardMerchantData.StoreId;
		                txtSocketNum.Text = merchantProfile.MerchantData.BankcardMerchantData.TerminalId;
		                txtTimeZoneDifferential.Text = merchantProfile.MerchantData.BankcardMerchantData.TimeZoneDifferential;
		                txtReimbursementAttribute.Text = merchantProfile.MerchantData.BankcardMerchantData.ReimbursementAttribute;
              	}
              	if (_svas != null)
              	{
              			//MerchantData.StoredValueMerchantData
		                txtAgentChain.Text = merchantProfile.MerchantData.StoredValueMerchantData.AgentChain;
		                txtClientNum.Text = merchantProfile.MerchantData.StoredValueMerchantData.ClientNumber;
		                txtSIC.Text = merchantProfile.MerchantData.StoredValueMerchantData.SIC;
		                txtStoreId.Text = merchantProfile.MerchantData.StoredValueMerchantData.StoreId;
		                txtSocketNum.Text = merchantProfile.MerchantData.StoredValueMerchantData.TerminalId;
		                _MerchantIndustryType = merchantProfile.MerchantData.StoredValueMerchantData.IndustryType;
		            }
                    if (_ecks != null)
                    {
                        //MerchantData.ElectronicCheckingMerchantData
                        txtMerchantId.Text = merchantProfile.MerchantData.ElectronicCheckingMerchantData.OrginatorId;
                        txtStoreId.Text = merchantProfile.MerchantData.ElectronicCheckingMerchantData.SiteId;
                        txtSocketNum.Text = merchantProfile.MerchantData.ElectronicCheckingMerchantData.ProductId;
                    }

                //First Populate with the Enumeration
                cboCountryCode.DataSource = Enum.GetValues(typeof(TypeISOCountryCodeA3));
                //Now select the index that matches
                if (merchantProfile.MerchantData.Address.CountryCode.ToString().Length > 0)
                {
                    cboCountryCode.SelectedItem = merchantProfile.MerchantData.Address.CountryCode;
                    _CountryCode = (TypeISOCountryCodeA3)cboCountryCode.SelectedItem;
                }
                //First Populate with the Enumeration
                cboLanguage.DataSource = Enum.GetValues(typeof(TypeISOLanguageCodeA3));
                //Now select the index that matches
                if (merchantProfile.MerchantData.Language.ToString().Length > 0)
                {
                    cboLanguage.SelectedItem = merchantProfile.MerchantData.Language;
                    _Language = (TypeISOLanguageCodeA3)cboLanguage.SelectedItem;
                }
                //First Populate with the Enumeration
                cboCurrencyCode.DataSource = Enum.GetValues(typeof(TypeISOCurrencyCodeA3));
                //Now select the index that matches
                if (merchantProfile.MerchantData.Language.ToString().Length > 0)
                {
                    cboCurrencyCode.SelectedItem = merchantProfile.TransactionData.BankcardTransactionDataDefaults.CurrencyCode;
                    _CurrencyCode = (TypeISOCurrencyCodeA3)cboCurrencyCode.SelectedItem;
                }

                //First Populate with the Enumeration
                cboCustomerPresent.DataSource = Enum.GetValues(typeof(CustomerPresent));
                //Now select the index that matches
                if (merchantProfile.TransactionData.BankcardTransactionDataDefaults.CustomerPresent.ToString().Length > 0)
                {
                    cboCustomerPresent.SelectedItem = merchantProfile.TransactionData.BankcardTransactionDataDefaults.CustomerPresent;
                    _CustomerPresent = (CustomerPresent)cboCustomerPresent.SelectedItem;
                }

                //First Populate with the Enumeration
                cboRequestACI.DataSource = Enum.GetValues(typeof(RequestACI));
                //Now select the index that matches
                if (merchantProfile.TransactionData.BankcardTransactionDataDefaults.RequestACI.ToString().Length > 0)
                {
                    cboRequestACI.SelectedItem = merchantProfile.TransactionData.BankcardTransactionDataDefaults.RequestACI;
                    _RequestACI = (RequestACI)cboRequestACI.SelectedItem;
                }

                //First Populate with the Enumeration
                cboMerchantIndustryType.DataSource = Enum.GetValues(typeof(IndustryType));
                if (merchantProfile.MerchantData.BankcardMerchantData.IndustryType.ToString().Length > 0)
                {
                    cboMerchantIndustryType.SelectedItem = merchantProfile.MerchantData.BankcardMerchantData.IndustryType;
                    _MerchantIndustryType = (IndustryType)cboMerchantIndustryType.SelectedItem;
                }

                //First Populate with the Enumeration
                cboEntryMode.DataSource = Enum.GetValues(typeof(EntryMode));
                if (merchantProfile.TransactionData.BankcardTransactionDataDefaults.EntryMode.ToString().Length > 0)
                {
                    cboEntryMode.SelectedItem = merchantProfile.TransactionData.BankcardTransactionDataDefaults.EntryMode;
                    _EntryMode = (EntryMode)cboEntryMode.SelectedItem;
                }

                _Add = false; //In this case it's an update and not an add
                cmdAddUpdate.Text = "Update";
            }
            

            if (_bcs != null)
            {
                if (_strServiceID == "C82ED00001" || _strServiceID == "71C8700001" ||
                    _strServiceID == "88D9300001" || _strServiceID == "B447F00001" ||
                    _strServiceID == "D806000001" || _strServiceID == "E88FD00001")
                    showBCPExpandedFields();
                else if (_strServiceID == "168511300C" || _strServiceID == "9999999999")
                    showBCPExpandedFields();
                else
                {
                    showBCPFields();
                }
            }

            if (_ecks != null)
            {
                showECKFields();
            }
            if (_svas != null)
            {
                showSVAFields();
            }
        }
        public void CallingForm(MerchantProfile merchantProfile, bool blnNewProfile, BankcardService bcs, ElectronicCheckingService ecks, StoredValueService svas, string serviceId)
        {
            _bcs = bcs;
            _ecks = ecks;
            _svas = svas;
            _strServiceID = serviceId;

            hideAllFields();
            //Since MerchantProfile is saved at the serviceId level, display serviceId.
            //txtMerchantProfileServiceId.Text = merchantProfile.ServiceId;

            if (serviceId.Length < 1)
                txtMerchantProfileServiceId.Text = "ServiceId not selected in calling form";
            else
                txtMerchantProfileServiceId.Text = serviceId;

            //Populate combo boxes with the Enumeration
            cboCountryCode.Sorted = true;
            cboCountryCode.DataSource = Enum.GetValues(typeof(TypeISOCountryCodeA3));
            cboCountryCode.SelectedItem = TypeISOCountryCodeA3.NotSet;

            cboLanguage.Sorted = true;
            cboLanguage.DataSource = Enum.GetValues(typeof(TypeISOLanguageCodeA3));
            cboLanguage.SelectedItem = TypeISOLanguageCodeA3.NotSet;

            cboCurrencyCode.Sorted = true;
            cboCurrencyCode.DataSource = Enum.GetValues(typeof(TypeISOCurrencyCodeA3));
            cboCurrencyCode.SelectedItem = TypeISOCurrencyCodeA3.NotSet;

            cboCustomerPresent.Sorted = true;
            cboCustomerPresent.DataSource = Enum.GetValues(typeof(CustomerPresent));
            cboCustomerPresent.SelectedItem = CustomerPresent.NotSet;

            cboRequestACI.Sorted = true;
            cboRequestACI.DataSource = Enum.GetValues(typeof(RequestACI));
            cboRequestACI.SelectedItem = RequestACI.IsCPSMeritCapable;

            cboEntryMode.Sorted = true;
            cboEntryMode.DataSource = Enum.GetValues(typeof(EntryMode));
            cboEntryMode.SelectedItem = EntryMode.NotSet;

            cboMerchantIndustryType.Sorted = true;
            cboMerchantIndustryType.DataSource = Enum.GetValues(typeof(IndustryType));
            cboMerchantIndustryType.SelectedItem = IndustryType.NotSet;

            if (_bcs != null)
            {
                if (_strServiceID == "C82ED00001" || _strServiceID == "71C8700001" ||
                    _strServiceID == "88D9300001" || _strServiceID == "B447F00001" ||
                    _strServiceID == "D806000001" || _strServiceID == "E88FD00001")
                    showBCPExpandedFields();
                else if (_strServiceID == "168511300C" || _strServiceID == "9999999999")
                    showBCPExpandedFields();
                else
                {
                    showBCPFields();
                }
            }

            if (_ecks != null)
            {
                showECKFields();
            }
            if (_svas != null)
            {
                showSVAFields();
            }
        }
Exemple #7
0
        public void CallingForm(MerchantProfile merchantProfile, bool blnNewProfile, BankcardService bcs, ElectronicCheckingService ecks, StoredValueService svas, string serviceId)
        {
            _bcs          = bcs;
            _ecks         = ecks;
            _svas         = svas;
            _strServiceID = serviceId;

            hideAllFields();
            //Since MerchantProfile is saved at the serviceId level, display serviceId.
            txtMerchantProfileServiceId.Text = merchantProfile.ServiceId;

            if (blnNewProfile)
            {//New profile to add to CWS
                cmdAddUpdate.Text = "Add";

                //Populate combo boxes with the Enumeration
                cboCountryCode.Sorted       = true;
                cboCountryCode.DataSource   = Enum.GetValues(typeof(TypeISOCountryCodeA3));
                cboCountryCode.SelectedItem = TypeISOCountryCodeA3.NotSet;

                cboLanguage.Sorted       = true;
                cboLanguage.DataSource   = Enum.GetValues(typeof(TypeISOLanguageCodeA3));
                cboLanguage.SelectedItem = TypeISOLanguageCodeA3.NotSet;

                cboCurrencyCode.Sorted       = true;
                cboCurrencyCode.DataSource   = Enum.GetValues(typeof(TypeISOCurrencyCodeA3));
                cboCurrencyCode.SelectedItem = TypeISOCurrencyCodeA3.NotSet;


                cboCustomerPresent.Sorted       = true;
                cboCustomerPresent.DataSource   = Enum.GetValues(typeof(CustomerPresent));
                cboCustomerPresent.SelectedItem = CustomerPresent.NotSet;

                cboRequestACI.Sorted       = true;
                cboRequestACI.DataSource   = Enum.GetValues(typeof(RequestACI));
                cboRequestACI.SelectedItem = RequestACI.IsCPSMeritCapable;

                cboEntryMode.Sorted       = true;
                cboEntryMode.DataSource   = Enum.GetValues(typeof(EntryMode));
                cboEntryMode.SelectedItem = EntryMode.NotSet;

                cboMerchantIndustryType.Sorted       = true;
                cboMerchantIndustryType.DataSource   = Enum.GetValues(typeof(IndustryType));
                cboMerchantIndustryType.SelectedItem = IndustryType.NotSet;
            }
            else
            {//Existing Profile to Update;
                //Note : items commented out are not use so no need to wire up a text box as well as add to 'SaveMerchantInformation()'
                txtProfileId.Text     = merchantProfile.ProfileId;
                txtProfileId.ReadOnly = true;
                lblLastUpdated.Text   = "Last Updated : " + merchantProfile.LastUpdated;
                //MerchantData
                //MerchantData.Address
                txtCity.Text           = merchantProfile.MerchantData.Address.City;
                txtPostalCode.Text     = merchantProfile.MerchantData.Address.PostalCode;
                txtStateProvince.Text  = merchantProfile.MerchantData.Address.StateProvince.ToString();
                txtStreetAddress1.Text = merchantProfile.MerchantData.Address.Street1;
                txtStreetAddress2.Text = merchantProfile.MerchantData.Address.Street2;

                txtCustomerServiceInternet.Text = merchantProfile.MerchantData.CustomerServiceInternet;
                txtCustomerServicePhone.Text    = merchantProfile.MerchantData.CustomerServicePhone;
                txtMerchantId.Text = merchantProfile.MerchantData.MerchantId;
                txtName.Text       = merchantProfile.MerchantData.Name;
                txtPhone.Text      = merchantProfile.MerchantData.Phone;
                txtTaxId.Text      = merchantProfile.MerchantData.TaxId;
                if (_bcs != null)
                {
                    //MerchantData.BankcardMerchantData
                    txtABANumber.Text   = merchantProfile.MerchantData.BankcardMerchantData.ABANumber;
                    txtAcquirerBIN.Text = merchantProfile.MerchantData.BankcardMerchantData.AcquirerBIN;
                    txtAgentBank.Text   = merchantProfile.MerchantData.BankcardMerchantData.AgentBank;
                    txtAgentChain.Text  = merchantProfile.MerchantData.BankcardMerchantData.AgentChain;
                    txtClientNum.Text   = merchantProfile.MerchantData.BankcardMerchantData.ClientNumber;
                    txtLocation.Text    = merchantProfile.MerchantData.BankcardMerchantData.Location;
                    //txtTBD.Text = _MerchantProfile.MerchantData.BankcardMerchantData.PrintCustomerServicePhone == "";
                    txtSecondaryTerminalId.Text = merchantProfile.MerchantData.BankcardMerchantData.SecondaryTerminalId;
                    txtSettlementAgent.Text     = merchantProfile.MerchantData.BankcardMerchantData.SettlementAgent;
                    txtSharingGroup.Text        = merchantProfile.MerchantData.BankcardMerchantData.SharingGroup;
                    txtSIC.Text                    = merchantProfile.MerchantData.BankcardMerchantData.SIC;
                    txtStoreId.Text                = merchantProfile.MerchantData.BankcardMerchantData.StoreId;
                    txtSocketNum.Text              = merchantProfile.MerchantData.BankcardMerchantData.TerminalId;
                    txtTimeZoneDifferential.Text   = merchantProfile.MerchantData.BankcardMerchantData.TimeZoneDifferential;
                    txtReimbursementAttribute.Text = merchantProfile.MerchantData.BankcardMerchantData.ReimbursementAttribute;
                }
                if (_svas != null)
                {
                    //MerchantData.StoredValueMerchantData
                    txtAgentChain.Text    = merchantProfile.MerchantData.StoredValueMerchantData.AgentChain;
                    txtClientNum.Text     = merchantProfile.MerchantData.StoredValueMerchantData.ClientNumber;
                    txtSIC.Text           = merchantProfile.MerchantData.StoredValueMerchantData.SIC;
                    txtStoreId.Text       = merchantProfile.MerchantData.StoredValueMerchantData.StoreId;
                    txtSocketNum.Text     = merchantProfile.MerchantData.StoredValueMerchantData.TerminalId;
                    _MerchantIndustryType = merchantProfile.MerchantData.StoredValueMerchantData.IndustryType;
                }
                if (_ecks != null)
                {
                    //MerchantData.ElectronicCheckingMerchantData
                    txtMerchantId.Text = merchantProfile.MerchantData.ElectronicCheckingMerchantData.OrginatorId;
                    txtStoreId.Text    = merchantProfile.MerchantData.ElectronicCheckingMerchantData.SiteId;
                    txtSocketNum.Text  = merchantProfile.MerchantData.ElectronicCheckingMerchantData.ProductId;
                }

                //First Populate with the Enumeration
                cboCountryCode.DataSource = Enum.GetValues(typeof(TypeISOCountryCodeA3));
                //Now select the index that matches
                if (merchantProfile.MerchantData.Address.CountryCode.ToString().Length > 0)
                {
                    cboCountryCode.SelectedItem = merchantProfile.MerchantData.Address.CountryCode;
                    _CountryCode = (TypeISOCountryCodeA3)cboCountryCode.SelectedItem;
                }
                //First Populate with the Enumeration
                cboLanguage.DataSource = Enum.GetValues(typeof(TypeISOLanguageCodeA3));
                //Now select the index that matches
                if (merchantProfile.MerchantData.Language.ToString().Length > 0)
                {
                    cboLanguage.SelectedItem = merchantProfile.MerchantData.Language;
                    _Language = (TypeISOLanguageCodeA3)cboLanguage.SelectedItem;
                }
                //First Populate with the Enumeration
                cboCurrencyCode.DataSource = Enum.GetValues(typeof(TypeISOCurrencyCodeA3));
                //Now select the index that matches
                if (merchantProfile.MerchantData.Language.ToString().Length > 0)
                {
                    cboCurrencyCode.SelectedItem = merchantProfile.TransactionData.BankcardTransactionDataDefaults.CurrencyCode;
                    _CurrencyCode = (TypeISOCurrencyCodeA3)cboCurrencyCode.SelectedItem;
                }

                //First Populate with the Enumeration
                cboCustomerPresent.DataSource = Enum.GetValues(typeof(CustomerPresent));
                //Now select the index that matches
                if (merchantProfile.TransactionData.BankcardTransactionDataDefaults.CustomerPresent.ToString().Length > 0)
                {
                    cboCustomerPresent.SelectedItem = merchantProfile.TransactionData.BankcardTransactionDataDefaults.CustomerPresent;
                    _CustomerPresent = (CustomerPresent)cboCustomerPresent.SelectedItem;
                }

                //First Populate with the Enumeration
                cboRequestACI.DataSource = Enum.GetValues(typeof(RequestACI));
                //Now select the index that matches
                if (merchantProfile.TransactionData.BankcardTransactionDataDefaults.RequestACI.ToString().Length > 0)
                {
                    cboRequestACI.SelectedItem = merchantProfile.TransactionData.BankcardTransactionDataDefaults.RequestACI;
                    _RequestACI = (RequestACI)cboRequestACI.SelectedItem;
                }

                //First Populate with the Enumeration
                cboMerchantIndustryType.DataSource = Enum.GetValues(typeof(IndustryType));
                if (merchantProfile.MerchantData.BankcardMerchantData.IndustryType.ToString().Length > 0)
                {
                    cboMerchantIndustryType.SelectedItem = merchantProfile.MerchantData.BankcardMerchantData.IndustryType;
                    _MerchantIndustryType = (IndustryType)cboMerchantIndustryType.SelectedItem;
                }

                //First Populate with the Enumeration
                cboEntryMode.DataSource = Enum.GetValues(typeof(EntryMode));
                if (merchantProfile.TransactionData.BankcardTransactionDataDefaults.EntryMode.ToString().Length > 0)
                {
                    cboEntryMode.SelectedItem = merchantProfile.TransactionData.BankcardTransactionDataDefaults.EntryMode;
                    _EntryMode = (EntryMode)cboEntryMode.SelectedItem;
                }

                _Add = false; //In this case it's an update and not an add
                cmdAddUpdate.Text = "Update";
            }


            if (_bcs != null)
            {
                if (_strServiceID == "C82ED00001" || _strServiceID == "71C8700001" ||
                    _strServiceID == "88D9300001" || _strServiceID == "B447F00001" ||
                    _strServiceID == "D806000001" || _strServiceID == "E88FD00001")
                {
                    showBCPExpandedFields();
                }
                else if (_strServiceID == "168511300C" || _strServiceID == "9999999999")
                {
                    showBCPExpandedFields();
                }
                else
                {
                    showBCPFields();
                }
            }

            if (_ecks != null)
            {
                showECKFields();
            }
            if (_svas != null)
            {
                showSVAFields();
            }
        }
        private void GetServiceInformation()
        {
            if (!_blnPersistedConfigExists)
                Helper.ServiceID = "";

            if (!_blnPersistedConfigExists)
                Helper.MerchantProfileId = "";

            //Reset previously selected services
            _bcs = null;
            _ecks = null;
            _svas = null;

            //The GetServiceInformation() operation provides information about the services that are available to a specific Service Key.
            //This operation should be automatically invoked during initial application configuration, and manually by an application
            //administrator if/when available services are updated.

            _si = Helper.Cwssic.GetServiceInformation(Helper.SessionToken);
        }