예제 #1
0
        public virtual AVSData buildAVSData(string address, string postalCode)
        {
            AVSData avsData = null;

            if ((!string.ReferenceEquals(address, null)) && (!string.ReferenceEquals(postalCode, null)))
            {
                avsData = new AVSData(address, postalCode);
            }
            return(avsData);
        }
        private void tabControl1_SelectedIndexChanged(object sender, EventArgs e)
        {
            string strIdentityTokenMessage = "\r\nIdentity Token [NOT ENCRYPTED]";
            if (_blnEncryptedIdentityToken)
            {
                strIdentityTokenMessage = "\r\nIdentity Token [ENCRYPTED]";
                _blnEncryptedIdentityToken = true;
            }

            applicationProfileIdToolStripMenuItem.Text = "Application ProfileId : " + Helper.ApplicationProfileId;
            serviceIdToolStripMenuItem.Text = "Service Id : " + Helper.ServiceID;
            workflowIdToolStripMenuItem.Text = "Workflow Id : " + Helper.WorkflowID;
            ChkUserWorkflowId.Text = "Use Workflow Id : " + Helper.WorkflowID;
            merchantProfileIdToolStripMenuItem.Text = "MerchantProfileId : " + Helper.MerchantProfileId;
            identityTokenToolStripMenuItem.Text = strIdentityTokenMessage;
            ServiceKeyToolStripMenuItem.Text = "Service Key : " + Helper.ServiceKey;
            if (RdoAVSUS.Checked)
            {
                GrpBxAVSIntl.Enabled = false;
                GrpBxAVSUS.Enabled = true;
                AVSData usAVSData = new AVSData();
                usAVSData.CardholderName = TxtCardHolderName.Text;
                usAVSData.Street = TxtAVSUSStreet.Text;
                usAVSData.City = TxtAVSUSCity.Text;
                usAVSData.StateProvince = TxtAVSUSState.Text;
                usAVSData.PostalCode = TxtAVSUSPostal.Text;
                usAVSData.Country = (TypeISOCountryCodeA3)CboAVUSCountry.SelectedItem;
                dg.AVSData = usAVSData;
                dg.ProcessInternationalAVS = false;

            }
            else
            {
                GrpBxAVSIntl.Enabled = true;
                GrpBxAVSUS.Enabled = false;
                InternationalAVSData intAVSData = new InternationalAVSData();

                intAVSData.Street = TxtAVSIntlStreet.Text;
                intAVSData.HouseNumber = TxtAVSIntlHouse.Text;
                intAVSData.POBoxNumber = TxtAVSIntlPOBox.Text;
                intAVSData.City = TxtAVSIntlCity.Text;
                intAVSData.StateProvince = TxtAVSIntlState.Text;
                intAVSData.PostalCode = TxtAVSIntlPostal.Text;
                intAVSData.Country = (TypeISOCountryCodeA3)CboAVSIntlCountry.SelectedItem;
                dg.IntlAVSData = intAVSData;
                dg.ProcessInternationalAVS = true;
                InternationalAVSOverride intAvsOverride = new InternationalAVSOverride();
                intAvsOverride.IgnoreAVS = ChkIgnoreAVS.Checked;
                intAvsOverride.SkipAVS = ChkSkipAVS.Checked;
                dg.InternationalAvsOverride = intAvsOverride;
            }
        }
        private void RdoAVSUS_CheckedChanged(object sender, EventArgs e)
        {
            if (RdoAVSUS.Checked)
            {
                GrpBxAVSIntl.Enabled = false;
                GrpBxAVSUS.Enabled = true;
                AVSData usAVSData = new AVSData();
                usAVSData.CardholderName = TxtCardHolderName.Text;
                usAVSData.Street = TxtAVSUSStreet.Text;
                usAVSData.City = TxtAVSUSCity.Text;
                usAVSData.StateProvince = TxtAVSUSState.Text;
                usAVSData.PostalCode = TxtAVSUSPostal.Text;
                usAVSData.Country = (TypeISOCountryCodeA3) CboAVUSCountry.SelectedItem;
                dg.AVSData = usAVSData;
                dg.ProcessInternationalAVS = false;
            }
            else
            {
                GrpBxAVSIntl.Enabled = true;
                GrpBxAVSUS.Enabled = false;
                InternationalAVSData intAVSData = new InternationalAVSData();

                intAVSData.Street = TxtAVSIntlStreet.Text;
                intAVSData.HouseNumber = TxtAVSIntlHouse.Text;
                intAVSData.POBoxNumber = TxtAVSIntlPOBox.Text;
                intAVSData.City = TxtAVSIntlCity.Text;
                intAVSData.StateProvince = TxtAVSIntlState.Text;
                intAVSData.PostalCode = TxtAVSIntlPostal.Text;
                intAVSData.Country = (TypeISOCountryCodeA3)CboAVSIntlCountry.SelectedItem;
                dg.IntlAVSData = intAVSData;
                dg.ProcessInternationalAVS = true;
                InternationalAVSOverride intAvsOverride = new InternationalAVSOverride();
                intAvsOverride.IgnoreAVS = ChkIgnoreAVS.Checked;
                intAvsOverride.SkipAVS = ChkSkipAVS.Checked;
                dg.InternationalAvsOverride = intAvsOverride;
            }
        }