private void execulteGer7Venda() { venda.type = GER7_VENDA; venda.id = random.Next(99999).ToString(); //Console.WriteLine(venda.id); venda.amount = Mask.Unmask(valPag.Text.Replace(",", "").Replace(".", "")); //Console.WriteLine(venda.amount); venda.installments = Mask.Unmask(qtdeParcelas.Text); //Console.WriteLine(venda.installments); if (rbDebito.Checked) { venda.setInstmode(this.GER7_SEMPARCELAMENTO); } else { //Console.WriteLine(venda.installments); if (venda.installments == "0" || venda.installments == "1") { venda.instmode = GER7_SEMPARCELAMENTO; } else if (this.rbParcLoja.Checked) { venda.instmode = GER7_PARCELADO_LOJA; } else if (this.rbParcAdm.Checked) { venda.instmode = GER7_PARCELADO_ADM; } } if (rbCredito.Checked) { venda.product = GER7_CREDITO; } else if (rbDebito.Checked) { venda.product = GER7_DEBITO; } else { venda.product = GER7_VOUCHER; } if (btnValidaImpressao.Checked) { venda.receipt = GER7_HABILITA_IMPRESSAO; } else { venda.receipt = GER7_DESABILITA_IMPRESSAO; } venda.apiversion = GER7_API_VERSION; string json = JsonConvert.SerializeObject(venda); intentGer7.PutExtra("jsonReq", json); StartActivityForResult(intentGer7, REQ_CODE); }
private void execulteSTefVenda() { REQ_CODE = 4321; Intent intentSitef = new Intent("br.com.softwareexpress.sitef.msitef.ACTIVITY_CLISITEF"); intentSitef.PutExtra("empresaSitef", "00000000"); intentSitef.PutExtra("enderecoSitef", ipEdit.Text); intentSitef.PutExtra("operador", "0001"); intentSitef.PutExtra("data", "20200324"); intentSitef.PutExtra("hora", "130358"); intentSitef.PutExtra("numeroCupom", op); intentSitef.PutExtra("valor", Mask.Unmask(valPag.Text.Replace(",", "").Replace(".", ""))); intentSitef.PutExtra("CNPJ_CPF", "03654119000176"); intentSitef.PutExtra("comExterna", "0"); if (rbCredito.Checked) { intentSitef.PutExtra("modalidade", "3"); if (qtdeParcelas.Text == "0" || qtdeParcelas.Text == "1") { intentSitef.PutExtra("transacoesHabilitadas", "26"); } else if (rbParcLoja.Checked) { // Essa informações habilida o parcelamento Loja intentSitef.PutExtra("transacoesHabilitadas", "27"); } else { // Essa informações habilida o parcelamento ADM intentSitef.PutExtra("transacoesHabilitadas", "28"); } intentSitef.PutExtra("numParcelas", qtdeParcelas.Text); } if (rbDebito.Checked) { intentSitef.PutExtra("modalidade", "2"); intentSitef.PutExtra("transacoesHabilitadas", "16"); } if (rbTodos.Checked) { intentSitef.PutExtra("modalidade", "0"); intentSitef.PutExtra("restricoes", "transacoesHabilitadas=16"); } intentSitef.PutExtra("isDoubleValidation", "0"); intentSitef.PutExtra("caminhoCertificadoCA", "ca_cert_perm"); if (btnValidaImpressao.Checked) { intentSitef.PutExtra("comprovante", "1"); } else { intentSitef.PutExtra("comprovante", "0"); } StartActivityForResult(intentSitef, REQ_CODE); }