Esempio n. 1
0
 void RunTrans()
 {
     #if USE_CALLBACK_FOR_CARD_READER
     EmvKernel.EmvRun(emv_param_tt_14);
     SetText("END\r\n");
     BEMVRun.Enabled = true;
     #else
     this.Invoke((MethodInvoker)(() => label16.ForeColor = System.Drawing.Color.Red));
     if (EmvKernel.Wait_USB_CardIn() == true)
     {
         strdllDetails = EmvKernel.EmvRun("test_ttype25.cfg");
         strdllDetails = dllDetails.Text;
         this.Invoke((MethodInvoker)(() => label16.Text = "The Payment Approved.\nPlease Take The Card."));
         EmvKernel.WaitCardOut();
         EnableRunEmv();
         this.Invoke((MethodInvoker)(() => label16.Text = "The Payment Approved.\nPlease Take The Card."));
         this.Invoke((MethodInvoker)(() => textBox5.Text = textBox6.Text));
         this.Invoke((MethodInvoker)(() => panel3.Visible = false));
         this.Invoke((MethodInvoker)(() => calculatePayment()));
     }
     else
     {
         //EnableRunEmv();
     }
     #endif
 }
Esempio n. 2
0
        void RunTrans()
        {
#if USE_CALLBACK_FOR_CARD_READER
            EmvKernel.EmvRun(emv_param_tt_14);
            SetText("END\r\n");
            BEMVRun.Enabled = true;
#else
            if (reader_name != null && com_port_name != null)
            {
                if (EmvKernel.WaitCardIn() == true)
                {
                    EmvKernel.EmvRun(emv_param_tt_25);
                    EmvKernel.WaitCardOut();
                    SetText("END\r\n");
                    EnableRunEmv();
                }
                else
                {
                    EnableRunEmv();
                }
            }
            else
            {
                if (usb_reader_name != null)
                {
                    if (EmvKernel.Wait_USB_CardIn() == true)
                    {
                        EmvKernel.EmvRun(emv_param_tt_25);
                        EmvKernel.WaitCardOut();
                        SetText("END\r\n");
                        EnableRunEmv();
                    }
                    else
                    {
                        EnableRunEmv();
                    }
                }
            }
#endif
        }