Example #1
0
        protected override void DoEntryPointD(Tuple <EMVTerminalProcessingOutcome, EMVSelectApplicationResponse, TerminalSupportedKernelAidTransactionTypeCombination, CardKernelAidCombination, EntryPointPreProcessingIndicators> indicators)
        {
            //3.4.1.1
            KernelBase kernel = EMVContactlessKernelActivation.ActivateKernel(tr, cardQProcessor, tornTransactionLogManager, publicKeyCertificateManager, indicators.Item2, indicators.Item3, indicators.Item4, indicators.Item5, cardExceptionManager, configProvider);

            kernel.ExceptionOccured += Kernel_ExceptionOccured;

            //TODO: change config to load only kernel specific tags
            terminalConfigurationData.LoadTerminalConfigurationDataObjects(((TerminalSupportedContactlessKernelAidTransactionTypeCombination)indicators.Item3).KernelEnum, configProvider);

            TLVList requestInput = new TLVList();

            requestInput.AddToList(indicators.Item2.GetFCITemplateTag());
            requestInput.AddListToList(tr.GetTxDataTLV());
            //TERMINAL_TRANSACTION_QUALIFIERS_9F66_KRN ttq = ((TerminalSupportedContactlessKernelAidTransactionTypeCombination)indicators.Item3).TTQ;
            TERMINAL_TRANSACTION_QUALIFIERS_9F66_KRN ttq = indicators.Item5.TTQ;

            if (ttq != null)
            {
                requestInput.AddToList(TLV.Create(EMVTagsEnum.TERMINAL_TRANSACTION_QUALIFIERS_TTQ_9F66_KRN.Tag, ttq.Value.Value));
            }

            KernelRequest request = new KernelRequest(KernelTerminalReaderServiceRequestEnum.ACT, requestInput);

            kernel.KernelQ.EnqueueToInput(request);
            Task.Run(() => kernel.StartNewTransaction(), cancellationTokenForTerminalApplication.Token);
            Task.Run(() => OnProcessCompleted(StartServiceQPRocess(kernel)));
        }