private void metroButton5_Click(object sender, EventArgs e) { try { Cursor.Current = Cursors.WaitCursor; var dsiEMVX = new DSIEMVXLib.DsiEMVX(); var emvTransaction = EMVTransactions.EMVParamDownload; var configData = new ConfigurationData(); var request = EMVRequest.GetEMVParamDownloadRequest(configData, GetTransData()); MessageBox.Show(request); DateTime startTime = DateTime.Now; var transactionProcessFactory = new TransactionProcessFactory(); var emvTxnProcessor = transactionProcessFactory.GetObject(emvTransaction); emvTxnProcessor.Request = request; emvTxnProcessor.Process(dsiEMVX, configData, GetTransData()); TimeSpan ts = DateTime.Now.Subtract(startTime); //this.lblClock.Text = string.Format("{0}:{1}:{2}.{3}", ts.Hours.ToString("0#"), ts.Minutes.ToString("0#"), ts.Seconds.ToString("0#"), ts.Milliseconds.ToString("#")); MessageBox.Show(emvTxnProcessor.Response); } catch (Exception ex) { MessageBox.Show(ex.ToString()); } finally { Cursor.Current = Cursors.Arrow; } }
public void Process(DSIEMVXLib.DsiEMVX dsiEMVX, ConfigurationData configData, TransactionData transData) { string txnResponse = string.Empty; _request = EMVRequest.GetEMVPadResetRequest(configData, transData); _response = dsiEMVX.ProcessTransaction(_request); _responseDictionary = XMLHelper.ParseXMLResponse(_response); }
private void btnEMVReturn_Click(object sender, EventArgs e) { txtResponse.Text = string.Empty; emvTransaction = EMVTransactions.EMVReturn; txtRequest.Text = EMVRequest.GetEMVReturnRequest(configData, GetTransData()); }
public void Process(DSIEMVXLib.DsiEMVX dsiEMVX, ConfigurationData configData, TransactionData transData) { var tempRequest = string.Empty; tempRequest = EMVRequest.GetEMVPadResetRequest(configData, transData); _response = dsiEMVX.ProcessTransaction(tempRequest); _responseDictionary = XMLHelper.ParseXMLResponse(_response); if (_responseDictionary["CmdStatus"].ToLower() == "success") { _response = dsiEMVX.ProcessTransaction(_request); _responseDictionary = XMLHelper.ParseXMLResponse(_response); tempRequest = EMVRequest.GetEMVPadResetRequest(configData, transData); dsiEMVX.ProcessTransaction(tempRequest); XMLHelper.ParseXMLResponse(_response); } }