public VisaMastercardBankard_Bolivariano_Info ValidarLineas_Bankard(ba_Archivo_Transferencia_Det_Info info) { try { VisaMastercardBankard_Bolivariano_Info BB_Cta_Cte_Aho_Info = new VisaMastercardBankard_Bolivariano_Info(); BB_Cta_Cte_Aho_Info.Tarjeta = info.Numero_Documento.PadLeft(16, '0'); BB_Cta_Cte_Aho_Info.Comercio = "00000000"; BB_Cta_Cte_Aho_Info.FechadeConsumo = info.Fecha.Year.ToString() + info.Fecha.Month.ToString().PadLeft(2, '0') + info.Fecha.Day.ToString().PadLeft(2, '0'); decimal valor = Convert.ToDecimal(info.vt_total); BB_Cta_Cte_Aho_Info.ValorConsumo = string.Format("{0:0.00}", valor); BB_Cta_Cte_Aho_Info.ValorConsumo = BB_Cta_Cte_Aho_Info.ValorConsumo.ToString().Replace(".", ""); BB_Cta_Cte_Aho_Info.ValorConsumo = BB_Cta_Cte_Aho_Info.ValorConsumo.PadLeft(19, '0'); BB_Cta_Cte_Aho_Info.ICE = "000000000000000"; BB_Cta_Cte_Aho_Info.TipoConsumo = "001"; BB_Cta_Cte_Aho_Info.NumerodeAutorizacion = "111111"; BB_Cta_Cte_Aho_Info.NumeroMesesDiferido = "01"; BB_Cta_Cte_Aho_Info.NumeroPagare = "5555555555"; BB_Cta_Cte_Aho_Info.Filler = "000000"; BB_Cta_Cte_Aho_Info.FechaExpiracion = info.Fecha.Year.ToString() + info.Fecha.Month.ToString().PadLeft(2, '0') + info.Fecha.Day.ToString().PadLeft(2, '0'); BB_Cta_Cte_Aho_Info.Iva = "00000000000000000"; BB_Cta_Cte_Aho_Info.TipodeDiferido = "01"; BB_Cta_Cte_Aho_Info.Moneda = "D"; BB_Cta_Cte_Aho_Info.Filer = "0000"; BB_Cta_Cte_Aho_Info.MontoGravaIva = "0000000000000"; BB_Cta_Cte_Aho_Info.MontoNoGravaIVA = "0000000000000"; return(BB_Cta_Cte_Aho_Info); } catch (Exception ex) { Core.Erp.Info.Log_Exception.LoggingManager.Logger.Log(Core.Erp.Info.Log_Exception.LoggingCategory.Error, ex.Message); throw new Core.Erp.Info.Log_Exception.DalException(string.Format("", "pu_ValidarLineaSAT", ex.Message), ex) { EntityType = typeof(VisaMastercardBankard_Bolivariano_Bus) }; } }
public Boolean Grabar_fille_Bankard(VisaMastercardBankard_Bolivariano_Info info, string nombreArchivo, string carSeparador, ref string msg) { try { string linea = ""; linea += info.Tarjeta; linea += info.Comercio; linea += info.FechadeConsumo; linea += info.ValorConsumoRotativo; linea += info.ValorConsumoDiferido; linea += info.TipoConsumo; linea += info.NumerodeAutorizacion; linea += info.NumeroMesesDiferido; linea += info.NumeroPagare; linea += info.BinFuente; linea += info.FechaExpiracion; linea += info.Iva; linea += info.TipodeDiferido; linea += info.Moneda; linea += info.Filler; linea += info.MontoGravaIva; linea += info.MontoNoGravaIVA; using (System.IO.StreamWriter file = new System.IO.StreamWriter(nombreArchivo, true)) { file.WriteLine(linea); file.Close(); } return(true); } catch (Exception ex) { string arreglo = ToString(); tb_sis_Log_Error_Vzen_Bus oDataLog = new tb_sis_Log_Error_Vzen_Bus(); tb_sis_Log_Error_Vzen_Info Log_Error_sis = new tb_sis_Log_Error_Vzen_Info(ex.ToString(), "", arreglo, "", "", "", "", "", DateTime.Now); mensaje = ex.InnerException + " " + ex.Message; throw new Exception(ex.InnerException.ToString()); } }
public VisaMastercardBankard_Bolivariano_Info ValidarLineas_Bankard(ba_Archivo_Transferencia_Det_Info info) { try { string sValor = ""; VisaMastercardBankard_Bolivariano_Info BB_Cta_Cte_Aho_Info = new VisaMastercardBankard_Bolivariano_Info(); BB_Cta_Cte_Aho_Info.Tarjeta = info.Numero_Documento.PadLeft(16, '0'); //BB_Cta_Cte_Aho_Info.Comercio = "00000000"; BB_Cta_Cte_Aho_Info.Comercio = "00836789"; //REVISADO DESDE ARCHIVO EJEMPLO. BB_Cta_Cte_Aho_Info.FechadeConsumo = info.Fecha.Year.ToString() + info.Fecha.Month.ToString().PadLeft(2, '0') + info.Fecha.Day.ToString().PadLeft(2, '0'); decimal valor = Convert.ToDecimal(info.vt_total); sValor = string.Format("{0:0.00}", valor); sValor = sValor.Replace(".", ""); sValor = sValor.PadLeft(17, '0'); BB_Cta_Cte_Aho_Info.ValorConsumo = sValor; //BB_Cta_Cte_Aho_Info.ValorConsumo = string.Format("{0:0.00}", valor); //BB_Cta_Cte_Aho_Info.ValorConsumo = BB_Cta_Cte_Aho_Info.ValorConsumo.ToString().Replace(".", ""); //BB_Cta_Cte_Aho_Info.ValorConsumo = BB_Cta_Cte_Aho_Info.ValorConsumo.PadLeft(19, '0'); BB_Cta_Cte_Aho_Info.ValorConsumoRotativo = info.estado_contrato_pago_garantizado == true ? "0000000000000000000" : sValor; BB_Cta_Cte_Aho_Info.ValorConsumoDiferido = info.estado_contrato_pago_garantizado == true ? sValor : "0000000000000000000"; BB_Cta_Cte_Aho_Info.ICE = "000000000000000"; BB_Cta_Cte_Aho_Info.TipoConsumo = info.estado_contrato_pago_garantizado == true ? "200" : "202"; //CONSULTAR //BB_Cta_Cte_Aho_Info.NumerodeAutorizacion = "111111"; BB_Cta_Cte_Aho_Info.NumerodeAutorizacion = "000000"; BB_Cta_Cte_Aho_Info.NumeroMesesDiferido = info.estado_contrato_pago_garantizado == true ? "10" : "1"; //BB_Cta_Cte_Aho_Info.NumeroPagare = "5555555555"; BB_Cta_Cte_Aho_Info.NumeroPagare = info.codigo_unico_estudiante.PadLeft(6, '0');; BB_Cta_Cte_Aho_Info.BinFuente = "000000"; //BB_Cta_Cte_Aho_Info.FechaExpiracion = info.Fecha.Year.ToString() + info.Fecha.Month.ToString().PadLeft(2, '0') + info.Fecha.Day.ToString().PadLeft(2, '0'); BB_Cta_Cte_Aho_Info.FechaExpiracion = info.FechaExpiracionTarjeta.Year.ToString() + info.FechaExpiracionTarjeta.Month.ToString().PadLeft(2, '0'); //BB_Cta_Cte_Aho_Info.Filler = "000000"; //BB_Cta_Cte_Aho_Info.Iva = "00000000000000000"; decimal iva = Convert.ToDecimal(info.vt_iva_valor); BB_Cta_Cte_Aho_Info.Iva = string.Format("{0:0.00}", iva); BB_Cta_Cte_Aho_Info.Iva = BB_Cta_Cte_Aho_Info.Iva.ToString().Replace(".", ""); BB_Cta_Cte_Aho_Info.Iva = BB_Cta_Cte_Aho_Info.Iva.PadLeft(17, '0'); //BB_Cta_Cte_Aho_Info.TipodeDiferido = "01"; BB_Cta_Cte_Aho_Info.TipodeDiferido = "00"; //CONSULTAR BB_Cta_Cte_Aho_Info.Moneda = "D"; //BB_Cta_Cte_Aho_Info.Filer = "0000"; BB_Cta_Cte_Aho_Info.Filer = "00000"; BB_Cta_Cte_Aho_Info.MontoGravaIva = "0000000000000"; //CONSULTAR BB_Cta_Cte_Aho_Info.MontoNoGravaIVA = "0000000000000"; //CONSULTAR return(BB_Cta_Cte_Aho_Info); } catch (Exception ex) { Core.Erp.Info.Log_Exception.LoggingManager.Logger.Log(Core.Erp.Info.Log_Exception.LoggingCategory.Error, ex.Message); throw new Core.Erp.Info.Log_Exception.DalException(string.Format("", "pu_ValidarLineaSAT", ex.Message), ex) { EntityType = typeof(VisaMastercardBankard_Bolivariano_Bus) }; } }