public static BankcardTransactionPro SetBankCardTxnData(BankCardProProcessingOptions _BCPPO)
        {
            //Note : the following values aplly to the BankcardTransaction
            BankcardTransactionPro BCtransaction = new BankcardTransactionPro();
            BankcardTransactionDataPro TxnData = new BankcardTransactionDataPro();//The following is necessary due to inheritance

            //The following are typical settings please ask your solution consultant if you have any questions
            TxnData.Amount = Convert.ToDecimal( (target.TxtAmount));
            #region Ways to Convert to a decimal with two decimals
            //Note : Decimal Example please remember that the amount must always be two decimals "0.00"
            //decimal dAmount = 10;
            //TxnData.Amount = Convert.ToDecimal(dAmount);
            //TxnData.Amount = Decimal.Parse(TxnData.Amount.ToString("0.00"));
            //Or Simply
            //TxnData.Amount = Decimal.Parse(TxnData.Amount.ToString("0.00"));

            //Note : String Example please remember that the amount must always be two decimals "0.00"
            //string strAmount = "10";
            //TxnData.Amount = Convert.ToDecimal(strAmount);
            //TxnData.Amount = Decimal.Parse(TxnData.Amount.ToString("0.00"));

            //Note : Int Example please remember that the amount must always be two decimals "0.00"
            //int intAmount = 10;
            //TxnData.Amount = Convert.ToDecimal(intAmount);
            //TxnData.Amount = Decimal.Parse(TxnData.Amount.ToString("0.00"));
            //Or
            //((int)(100 * amount)) * 0.01m;

            #endregion Ways to Convert to a decimal with two decimals

            if (target.TxtTip.Length > 0)
                if (Convert.ToDecimal(target.TxtTip) > 0)
                    TxnData.TipAmount = Convert.ToDecimal(target.TxtTip);

            if (target.chkProcessAsPINDebitTxn)//Cashback for PINDebit only
                if (target.TxtCashBack.Length > 0)
                    if (Convert.ToDecimal(target.TxtCashBack) > 0)
                        TxnData.CashBackAmount = Convert.ToDecimal(target.TxtCashBack);

            TxnData.CurrencyCode = schemas.ipcommerce.com.Ipc.General.WCF.Contracts.Common.External.Txn.TypeISOCurrencyCodeA3.USD;
            //Set below
            //try { TxnData.EntryMode = (schemas.ipcommerce.com.Ipc.General.WCF.Contracts.Common.External.Txn.EntryMode)_ITV._EntryMode; }
            //catch { }
            try { TxnData.CustomerPresent = (schemas.ipcommerce.com.Ipc.General.WCF.Contracts.Common.External.Txn.CustomerPresent)_ITV._CustomerPresent; }
            catch { }
            try { TxnData.SignatureCaptured = _ITV._SignatureCaptured; }
            catch { }

            //Used for Vantiv
            TxnData.TransactionDateTime = DateTime.Now.ToString("yyyy-MM-ddTHH:mm:ss.fffzzz");

            //In the case of Retail or Restaurant
            //TxnData.TipAmount = 3.00M;

            // Used for QuasiCash transactions
            TxnData.IsQuasiCash = false;

            TxnData.LaneId = "1";//Used for Vantiv Tandem

            //Used for Retail/Restaurant/MOTO
            TxnData.EmployeeId = "123456";

            //Used for Ecommerce/MOTO
            TxnData.OrderNumber = "123543"; //This values must be unique for each transaction. OrderNum should never be zero
            //TxnData.GoodsType = GoodsType.PhysicalGoods;

            //Check to see if partial approval should be allowed. To test a value of *.59 can be used
            if (target.ChkAllowPartialApprovals)
                TxnData.PartialApprovalCapable = schemas.ipcommerce.com.Ipc.General.WCF.Contracts.Common.External.Txn.PartialApprovalSupportType.Capable;

            TxnData.TransactionDateTime = DateTime.Now.ToString("yyyy-MM-ddTHH:mm:ss.fffzzz");

            // The below value is to support partial authorizations as mandated by Visa and Mastercard
            // First check to see if the service supports partial approvals, if it does then set the flag
            // that this transaction will support that partial approval.  Remember to parse your Response.Amount to verify
            // the amount that was approved.  Card Not Present applications do not need to abide by the partial approval mandate
            if (target._bcs.Tenders.PartialApprovalSupportType == schemas.ipcommerce.com.Ipc.General.WCF.Contracts.Common.External.SvcInfo.PartialApprovalSupportType.Enabled)
                TxnData.PartialApprovalCapable = schemas.ipcommerce.com.Ipc.General.WCF.Contracts.Common.External.Txn.PartialApprovalSupportType.Capable;

            BCtransaction.CustomerData = new TransactionCustomerData();
            BCtransaction.CustomerData.CustomerId = TxnData.OrderNumber;

            BCtransaction.TenderData = new BankcardTenderData();
            BCtransaction.TenderData.CardData = new CardData();

            //Process as a Swipe or as a Keyed Transaction
            if (target.ChkCardNotPresent)
            {//Keyed Transaction
                TxnData.EntryMode = EntryMode.Keyed;
                BCtransaction.TenderData.CardData.CardType = (TypeCardType)target.CboCardTypes;
                BCtransaction.TenderData.CardData.Expire = target.TxtExpirationDate; // Note : that in a swipe track data the format is "YYMM" however here it's "MMYY"
                BCtransaction.TenderData.CardData.PAN = target.TxtPAN;
                BCtransaction.TenderData.CardData.CardholderName = "Dirk Pit";
            }
            else if (target.ChkTokenization)
            {//Card tokenization
                try
                {
                    TxnData.EntryMode = EntryMode.Keyed;
                    TokenizedTransaction T = (TokenizedTransaction)target.CboTokenizedCard;
                    BCtransaction.TenderData.CardData = new CardData();
                    BCtransaction.TenderData.PaymentAccountDataToken = T.PaymentAccountDataToken;
                    BCtransaction.TenderData.CardData.CardType = T.CardType;
                    BCtransaction.TenderData.CardData.Expire = T.ExpireationDate; // Note : that in a swipe track data the format is "YYMM" however here it's "MMYY"
                    BCtransaction.TenderData.CardData.PAN = T.MaskedPAN; //It's recommended to set the masked PAN that was returned with the original token
                }
                catch { }
            }
            else if (target.ChkTrackDataFromMSR)
            {//Swiped Transaction
                #region Card Validation Samples (Optional however good reference for sending valid card swipes)
                //NOTE Example : In the case of processing a card swipe string use the following.
                //NOTE Example : The following will remove starting and ending sentenals
                BCtransaction.TenderData.CardData.CardType = (TypeCardType) target.CboCardTypes;
                string SwipeToSeperateTracks = target.TxtTrackDataFromMSR;
                TrackFromMSRSwipe TFMSRS = target.Helper.seperateTrackData(SwipeToSeperateTracks);

                string[] TrackProcessingOrder = ConfigurationManager.AppSettings["TxnData_OrderOfProcessingTracks"].Split('|');
                foreach (string track in TrackProcessingOrder)
                {
                    if (track == "Track1")
                        if (target.Helper.validateTrackData(ref BCtransaction, TFMSRS.Track1Data))
                        {
                            TxnData.EntryMode = EntryMode.TrackDataFromMSR;
                            break;
                        }
                    if (track == "Track2")
                        if (target.Helper.validateTrackData(ref BCtransaction, TFMSRS.Track2Data))
                        {
                            TxnData.EntryMode = EntryMode.Track2DataFromMSR;
                            break;
                        }
                    if (track == "Keyed")
                    {
                        DialogResult Result;
                        Result = MessageBox.Show("Neither Track 1 nor Track 2 match. Process as a Keyed transaction instead?",
                                    "Process as Keyed", MessageBoxButtons.OKCancel);
                        if (Result == DialogResult.Cancel) { Exception e = new Exception("Neither Track 1 or Track 2 is valid. Plesae swipe again"); throw e; }
                        TxnData.EntryMode = EntryMode.Keyed;
                        BCtransaction.TenderData.CardData.CardType = (TypeCardType)target.CboCardTypes;
                        BCtransaction.TenderData.CardData.Expire = target.TxtExpirationDate; // Note : that in a swipe track data the format is "YYMM" however here it's "MMYY"
                        BCtransaction.TenderData.CardData.PAN = target.TxtPAN;
                        break;
                    }
                }

                //Note : Other Track Examples (includes track 1 track 2 and an example of track 3)
                //MasterCard : %B5454545454545454^IPCOMMERCE/TESTCARD^1312101013490000000001000880000?;5454545454545454=13121010134988000010?
                //MasterCardPurchase : %B5480020605154711^IPCOMMERCE/TESTCARD^1312101100000001000000218000000?;5480020605154711=13121011000017026218?
                //MasterCardSigDebit : %B9999989900007723^IPCOMMERCE/TESTCARD^13121015432112345678?;9999989900007723=13121015432112345678?
                //Visa : %B4111111111111111^IPCOMMERCE/TESTCARD^13121010454500415000010?;4111111111111111=13121010454541500010?
                //Visa Purchasecard : %B4005765777003^IPCOMMERCE/TESTCARD^13121015432112345678?;4005765777003=13121015432112345678?
                //AmericanExpress : %B371449635398456^IPCOMMERCE/TESTCARD^1312060523319?;371449635398456=1312060523319?
                //Discover : %B6011000995504101^IPCOMMERCE/TESTCARD^13121011000627210201?;6011000995504101=13121011000627210201?
                //The following track includes a track 3 which is possible in Costco American Express cards %B371449635398456^IPCOMMERCE/TESTCARD^1312060523319?;371449635398456=1312060523319?+823156444000?

                #endregion Card Validation Samples (Optional however good reference for sending valid card swipes)
            }

            #region Simulating a flag used to set either AVS CV or PINDebit data
            //Simulating a flag used to set either AVS, CV data or PINDebit
            bool blnAVS = _ITV._IncludeAVS;
            bool blnCVV = _ITV._IncludeCV;

            if (blnAVS | blnCVV | target.chkProcessAsPINDebitTxn)
            {
                BCtransaction.TenderData.CardSecurityData = new CardSecurityData(); //Required if AVS or CV is used
                if (blnAVS)
                {
                    //AVSData
                    BCtransaction.TenderData.CardSecurityData.AVSData = new AVSData();
                    //Required AVS Elements
                    BCtransaction.TenderData.CardSecurityData.AVSData.PostalCode = "80023";
                    //Optional AVS Elements
                    BCtransaction.TenderData.CardSecurityData.AVSData.CardholderName = "John Smith";
                    BCtransaction.TenderData.CardSecurityData.AVSData.City = "Mason";
                    BCtransaction.TenderData.CardSecurityData.AVSData.Country = schemas.ipcommerce.com.Ipc.General.WCF.Contracts.Common.External.Txn.TypeISOCountryCodeA3.USA;
                    BCtransaction.TenderData.CardSecurityData.AVSData.Phone = "513 5456699"; //Must be of format "NNN NNNNNNN"
                    BCtransaction.TenderData.CardSecurityData.AVSData.StateProvince = "OH";
                    BCtransaction.TenderData.CardSecurityData.AVSData.Street = "1234 IrwinSimpaon";
                }
                if (blnCVV)
                {
                    //CVData
                    string strCVData = "111"; //Please note that this would typically be an input field in the application.
                    if ((TypeCardType)target.CboCardTypes == TypeCardType.AmericanExpress)
                        strCVData = "1111";//AVS has 4 numeric
                    if (strCVData.Length > 0)
                    {
                        BCtransaction.TenderData.CardSecurityData.CVDataProvided = CVDataProvided.Provided;
                        BCtransaction.TenderData.CardSecurityData.CVData = strCVData;
                    }
                    else
                    {
                        //In this case the card was present (Retail or Restaurant) however the CV code was not readable or available
                        BCtransaction.TenderData.CardSecurityData.CVDataProvided = CVDataProvided.DeliberatelyBypass;
                    }
                }
                //Check to see if the transaction is a PINDebit Transaction
                if (target.chkProcessAsPINDebitTxn)
                {
                    BCtransaction.TenderData.CardSecurityData.KeySerialNumber = "1234567890123456";
                    BCtransaction.TenderData.CardSecurityData.PIN = "1234567890";
                    TxnData.AccountType = AccountType.CheckingAccount;
                }
            }
            #endregion END Simulating a flag used to set either AVS CV or PINDebit data

            #region Check to see if PINLessDebit selected

            if (target.ChkProcessAsPINLessDebit)
            {
                TxnData.PINlessDebitData = new PINlessDebitData();
                TxnData.PINlessDebitData.PayeeData = new PayeeData();
                TxnData.PINlessDebitData.PayeeData.AccountNumber = "000056";
                TxnData.PINlessDebitData.PayeeData.CompanyName = "ABC Company";
                TxnData.PINlessDebitData.PayeeData.Phone = "555 1238888";
            }

            #endregion END Check to see if PINLessDebit selected

            //#region Simulating a flag used to set Magensa data
            ////Simulating a flag used to set either AVS, CV data or PINDebit
            //bool blnMagensa = false;

            //try { blnMagensa = Convert.ToBoolean(ConfigurationManager.AppSettings["TxnData_ProcessMagensaTxn"]); }
            //catch { };

            //if (blnMagensa)
            //{ //*** ToDo : the following are generic values which will only work against Sandbox.***
            //    //First set the CardData to null
            //    BCtransaction.TenderData.CardData = null;

            //    if (BCtransaction.TenderData.CardSecurityData == null) { BCtransaction.TenderData.CardSecurityData = new CardSecurityData(); }
            //    BCtransaction.TenderData.CardSecurityData.CVData = null;
            //    BCtransaction.TenderData.CardSecurityData.CVDataProvided = CVDataProvided.NotSet;
            //    BCtransaction.TenderData.CardSecurityData.IdentificationInformation = "A52AFB9FB5B283A6C8C38377A6CB1D2C63CC59D3B0B29D2A0DF1C9A54F123D37536756C77B4A9B75E51BF028B51971E81C8B221533A3AFF4";

            //    BCtransaction.TenderData.SecurePaymentAccountData = "13A7783BD91D0A05712606644778CF8F34397EAC2AB26676A52A380350CAA07E";

            //    BCtransaction.TenderData.EncryptionKeyId = "9011400B042692000398";
            //    BCtransaction.TenderData.SwipeStatus = "1065057";

            //    TxnData.ScoreThreshold = ".5";
            //    TxnData.EntryMode = EntryMode.Track2DataFromMSR;
            //    TxnData.Reference = "11";

            //}
            //#endregion Simulating a flag used to set Magensa data

            #region Pro specific functionality
            //Note : BankcardTransactionPro
            //The following sections are specific to the Pro object
            //Applications that will support Level 2, Level 3, and Managed Billing (recurring/installment payments) data may be
            //required to provide the following data elements in addition to the Base Transaction and Bankcard
            //Transaction data elements described above.
            if (Convert.ToBoolean(ConfigurationManager.AppSettings["ProcessAsBankcardTransaction_Pro"]) | _BCPPO != null)//Determines if additional Pro objects should be used.
            {
                PurchaseCardLevel PCL;
                bool InterchangeData;
                bool L2L3;
                if (_BCPPO != null)
                {//In this case an override was passed in
                    PCL = _BCPPO.PurchaseCardLevel;
                    InterchangeData = _BCPPO.InterchangeData;
                    L2L3 = _BCPPO.IncludeLevel2OrLevel3Data;
                }
                else
                {//Use the default values in the app.config
                    PCL = (PurchaseCardLevel)Enum.Parse(typeof(PurchaseCardLevel), ConfigurationManager.AppSettings["Pro_PurchaseCardLevel"]);
                    InterchangeData = Convert.ToBoolean(ConfigurationManager.AppSettings["Pro_InterchangeData"]);
                    L2L3 = Convert.ToBoolean(ConfigurationManager.AppSettings["Pro_IncludeLevel2OrLevel3Data"]);
                }

                #region Purchase Card Level 2 or Level 3
                if (PCL == PurchaseCardLevel.Level2 | PCL == PurchaseCardLevel.Level3)
                {
                    /*
                        For AuthorizeAndCapture the level2/3 goes in immediately as there is no follow up transaction.
                        For Authorize followed by Capture the level 2/3 goes in the Capture, never in the Authorize.
                        The schema requires BaseAmt and OrderNum for level 2.  Amt, Quantity, SeqNum, TaxIncludedInd, and UnitPrice are all required for level 3.
                        • Of course you must have level 2 in order to have level 3.
                        Set TxnData.CmrclCardReq to “Enable” since some providers get that value and will return the card type in the response in CmrclCardResp.  Not all providers do this but they should always set it.
                        The value is returned in the response and can be used to determine whether or not to submit level 2.

                        Level 2 requirements for Ecomm/Moto:
                        • TaxExempt
                        • DestinationPostal
                        • ShipFromPostalCode
                        Level 2 requirements for Retail:
                        • DestinationPostal
                        • TaxExempt
                        Level 3 requirements for Ecomm/Moto:
                        • Desc
                        • ProductCode
                        • UnitOfMeasure
                        • only 98 items allowed
                    */

                    //Send with the original Authorize with the "RequestCommerciaCard" flag set. In the response you will reference
                    //"CommercialCardResponse" as the indicator that the card is a valid Level 2 or Level 3 card.
                    BCtransaction.InterchangeData = new BankcardInterchangeData();
                    BCtransaction.InterchangeData.RequestCommercialCard = RequestCommercialCard.Enable;

                    if (L2L3 & PCL == PurchaseCardLevel.Level2)
                    {//Level 2 data
                        TxnData.Level2Data = SetLevel2Data();

                        if (BCtransaction.TenderData.CardData.CardType == TypeCardType.AmericanExpress)
                        {
                            BCtransaction.CustomerData = new TransactionCustomerData();
                            BCtransaction.CustomerData.ShippingData = new CustomerInfo();
                            BCtransaction.CustomerData.ShippingData.Name = new NameInfo();
                            BCtransaction.CustomerData.ShippingData.Address = new schemas.ipcommerce.com.Ipc.General.WCF.Contracts.Common.External.Txn.AddressInfo();

                            //For Amex only cards. Amex only supports Purchase Card Level 2
                            BCtransaction.CustomerData.ShippingData.Name.First = "Dan"; //Full name or parameterized name.
                            BCtransaction.CustomerData.ShippingData.Name.Middle = "Joe";
                            BCtransaction.CustomerData.ShippingData.Name.Last = "Billings";

                            BCtransaction.CustomerData.ShippingData.Address.Street1 = "123 HappyWay";
                            //BCtransaction.CustomerData.ShippingData.Address.Street2 = "";
                            BCtransaction.CustomerData.ShippingData.Address.City = "Mason";
                            BCtransaction.CustomerData.ShippingData.Address.StateProvince = "OH";
                            BCtransaction.CustomerData.ShippingData.Address.PostalCode = "45040";
                            BCtransaction.CustomerData.ShippingData.Address.CountryCode = schemas.ipcommerce.com.Ipc.General.WCF.Contracts.Common.External.Txn.TypeISOCountryCodeA3.USA;
                        }
                    }
                    if (L2L3 & PCL == PurchaseCardLevel.Level3)
                    {//Level 3 data
                        TxnData.Level2Data = SetLevel2Data();

                        //Level 3 data includes Level 2 data plus line items details. in this case your application should handle calling the following
                        // for each line item
                        List<LineItemDetail> LIDs = new List<LineItemDetail>();
                        LineItemDetail LID = new LineItemDetail();
                        LID = SetLevel3Data();
                        LIDs.Add(LID);
                        TxnData.LineItemDetails = LIDs;
                    }
                }

                #endregion Purchase Card Level 2 or Level 3

                #region Recurring/Bill Payments

                if (InterchangeData)
                {
                    BCtransaction.InterchangeData = new BankcardInterchangeData();

                    //Single Payment
                    BCtransaction.InterchangeData.BillPayment = BillPayment.SinglePayment;
                    BCtransaction.InterchangeData.ExistingDebt = ExistingDebt.IsExistingDebt;

                    /*
                    //Deferred Billing
                    BCtransaction.InterchangeData.BillPayment = BillPayment.DeferredBilling;
                    BCtransaction.InterchangeData.ExistingDebt = ExistingDebt.IsExistingDebt;

                    //Installment
                    BCtransaction.InterchangeData.BillPayment = BillPayment.Installment;
                    BCtransaction.InterchangeData.ExistingDebt = ExistingDebt.IsExistingDebt;
                    BCtransaction.InterchangeData.CurrentInstallmentNumber = 1;
                    BCtransaction.InterchangeData.TotalNumberOfInstallments = 3;
                    */
                    //Recurring
                    //Note: Any time recurring payments are used for any BCP service MultiClearSeqNum should be 1 for the first payment and any number
                    //greater than 1 for the additional recurring payments.  The software company doesn’t have to count payments.
                    //They can always send 2 for the additional transactions if they want. Sending the 1 sends a code to the service provider that this
                    //is the first payment and CVData and AVSData are expected.  Sending greater than 1 means that the lack of CVData and AVSData is OK
                    //since they don’t have to store or submit that data with the additional payments.
                    BCtransaction.InterchangeData.BillPayment = BillPayment.Recurring;
                    BCtransaction.InterchangeData.ExistingDebt = ExistingDebt.IsExistingDebt;
                    BCtransaction.InterchangeData.CurrentInstallmentNumber = 1; //If this is a follow-up recuring payment the value needs to be greater than 1.

                    //Any time BillPayInd is set to either “Deferred_Billing”, “Installment” or “Recurring”, CustPresentFlag should be set to “Bill_Payment"
                    if (BCtransaction.InterchangeData.BillPayment == BillPayment.DeferredBilling | BCtransaction.InterchangeData.BillPayment == BillPayment.Installment | BCtransaction.InterchangeData.BillPayment == BillPayment.Recurring)
                        TxnData.CustomerPresent = schemas.ipcommerce.com.Ipc.General.WCF.Contracts.Common.External.Txn.CustomerPresent.BillPayment;
                }

                #endregion Recurring/Bill Payments

            }

            #endregion END-Pro specific functionality

            #region Verified By Visa (VbV/VPAS)
            bool blnVPAS = false;
            try { blnVPAS = Convert.ToBoolean(ConfigurationManager.AppSettings["TxnData_IncludeVPAS"]); }
            catch { };
            /* IF supported
                If a token is obtained:
                    TenderData/EcommerceSecurityData/TokenData is required and contains the token provided by the service.
                    TenderData/EcommerceSecurityData/TokenInd is required and must be set to VPAS_3D_Secure_V100 or VPAS_3D_Secure_V102.  Even if the merchant has a newer version, either setting will work for any version.
                    TxnData/EcommerceData/PayTypeInd is required and must be set to Secure_Ecom.
                    TenderData/EcommerceSecurityData/XID is optional and may contain the Visa XID value.
                If VbV is supported but the token could not be obtained:
                    TenderData/EcommerceSecurityData/TokenData will not be populated.
                    TenderData/EcommerceSecurityData/TokenInd is required and must be set to Attempted_Card_Unsupported or Attempted_Service_Unavailable.
                    TxnData/EcommerceData/PayTypeInd is required and must be set to Non_authenticated_Security_Without_SSL or Non_authenticated_Security_With_SSL.
             */
            if (blnVPAS && BCtransaction.TenderData.CardData.CardType == TypeCardType.Visa)
            {
                //Token Obtained
                BCtransaction.TenderData.EcommerceSecurityData.TokenData = "";
                BCtransaction.TenderData.EcommerceSecurityData.TokenIndicator = TokenIndicator.VPAS;
                //TODO :TxnData.
                BCtransaction.TenderData.EcommerceSecurityData.XID = "";

                //No Token Obtained
                BCtransaction.TenderData.EcommerceSecurityData.TokenIndicator = TokenIndicator.AttemptedCardUnsupported;
                //TODO :TxnData.
            }
            #endregion Verified By Visa (VbV/VPAS)

            #region MasterCard Secure Code (MCSC/UCAF)
            bool blnUCAF = false;
            try { blnUCAF = Convert.ToBoolean(ConfigurationManager.AppSettings["TxnData_IncludeUCAF"]); }
            catch { };
            /*
             * If a token is obtained:
                    TenderData/EcommerceSecurityData/TokenData is required and contains the token provided by the service.
                    TenderData/EcommerceSecurityData/TokenInd is required and must be set to UCAF or UCAF_With_Data.
                    TxnData/EcommerceData/PayTypeInd is required and must be set to Secure_Ecom.
               If MCSC is supported but the token could not be obtained or will not be sent with the transaction:
                    TenderData/EcommerceSecurityData/TokenData will not be populated.
                    TenderData/EcommerceSecurityData/TokenInd is required and must be set to Attempted_Card_Unsupported, Attempted_Service_Unavailable, or UCAF_Without_Data.
                    TxnData/EcommerceData/PayTypeInd is required and must be set to either Non_authenticated_Security_Without_SSL or Non_authenticated_Security_With_SSL.
             */
            if (blnUCAF && BCtransaction.TenderData.CardData.CardType == TypeCardType.MasterCard)
            {
                //Token Obtained
                BCtransaction.TenderData.EcommerceSecurityData.TokenData = "";
                BCtransaction.TenderData.EcommerceSecurityData.TokenIndicator = TokenIndicator.UCAFWithData;
                //TODO :TxnData.
                BCtransaction.TenderData.EcommerceSecurityData.XID = "";

                //No Token Obtained
                BCtransaction.TenderData.EcommerceSecurityData.TokenIndicator = TokenIndicator.AttemptedCardUnsupported;
                //TODO :TxnData.
            }
            #endregion MasterCard Secure Code (MCSC/UCAF)

            # region Convenience Fees

            //Simulating a flag used to include Convenience Fees
            bool cFees = false;

            try { cFees = Convert.ToBoolean(ConfigurationManager.AppSettings["TxnData_IncludeCFees"]); }
            catch { };

            if (cFees)
            {
                //TxnData.FeeAmount = 5.00M;
            }

            # endregion Convenience Fees

            #region Soft Descriptors

            //Simulating setting soft descriptors
            try
            {
                if (Convert.ToBoolean(ConfigurationManager.AppSettings["TxnData_SoftDescriptors"]))
                {
                    TxnData.AlternativeMerchantData = target.Helper.SetSoftDescriptors();
                }
            }
            catch { };

            #endregion Soft Descriptors

            BCtransaction.TransactionData = TxnData;
            return BCtransaction;
        }
        public void AuthorizeAndCapture(BankCardProProcessingOptions BCPPO)
        {
            //The AuthorizeAndCapture() operation is used to authorize and capture a transaction in a single invocation.

            //Check to see if this transaction type is supported
            if (!_bcs.Operations.AuthAndCapture) { MessageBox.Show("AuthAndCapture Not Supported"); return; }

            //if (_bcs != null)
            //{
            //    if (!chkProcessAsPINDebitTxn.Checked &&
            //        _bcs.Tenders.CreditAuthorizeSupport == CreditAuthorizeSupportType.Both)
            //    {
            //        if (_bcs.Tenders.CreditAuthorizeSupport == CreditAuthorizeSupportType.AuthorizeOnly)
            //        {
            //            MessageBox.Show("This service only support AuthorizeOnly for Credit transactions");
            //            Cursor = Cursors.Default;
            //            return;
            //        }
            //        if (_bcs.Tenders.CreditAuthorizeSupport == CreditAuthorizeSupportType.AuthorizeAndCaptureOnly)
            //        {
            //            MessageBox.Show("This service only support AuthorizeAndCaptureOnly for Credit transactions");
            //            Cursor = Cursors.Default;
            //            return;
            //        }
            //    }

                try
                {
                    BankcardTransaction BCtransaction = DataGenerator.SetBankCardTxnData(BCPPO);
                    processResponse(Helper.ProcessBCPTransaction(TransactionType.AuthorizeAndCapture, BCtransaction, null, null, null,
                                                 null, null, null, null, false,
                                                 false));
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
                finally
                {
                }
            //			}
            //else if (_ecks != null) //Process as a Check transaction
            //{
            //    try
            //    {
            //        MessageBox.Show(@"Placeholder for ECK code. Please ask your solution consultant for an example");
            //    }
            //    catch (Exception ex)
            //    {
            //        MessageBox.Show(ex.Message);
            //    }
            //    finally
            //    {
            //        Cursor = Cursors.Default;
            //    }
            //}
            //else if (_svas != null) //Process as a Check transaction
            //{
            //    try
            //    {
            //        StoredValueTransaction SVATransaction = DataGenerator.SetStoredValueTxnData();
            //        //Let's Query a transaction
            //        processResponse(Helper.ProcessSVATransaction(TransactionType.Authorize, SVATransaction, null, null, null, null, ChkAcknowledge.Checked));
            //    }
            //    catch (Exception ex)
            //    {
            //        MessageBox.Show(ex.Message);
            //    }
            //    finally
            //    {
            //        Cursor = Cursors.Default;
            //    }
            //}
        }