public string getBodyBankCreateSplit( string I, bool test, string public_key, string private_key, string bank, string invoice, string description, string value, string tax, string tax_base, string currency, string type_person, string doc_type, string doc_number, string name, string last_name, string email, string country, string cell_phone, string url_response, string url_confirmation, string method_confirmation, string splitpayment, string split_app_id, string split_merchant_id, string split_type, string split_primary_receiver, string split_primary_receiver_fee, List <SplitReceivers> split_receivers, string extra1 = "", string extra2 = "", string extra3 = "", string extra4 = "", string extra5 = "", string extra6 = "", string extra7 = "") { var localIP = ""; IPHostEntry host = Dns.GetHostEntry(Dns.GetHostName()); localIP = host.AddressList.First(i => i.AddressFamily.ToString() == "InterNetwork").ToString(); string split_data = ""; int count = 0; foreach (var split in split_receivers) { if (count == 0) { split_data += "[{" + split.id + "," + split.fee + "," + split.fee_type + ""; } else { split_data += ",{" + split.id + "," + split.fee + "," + split.fee_type + ""; } if (count == split_receivers.Count - 1) { split_data += "}]"; } else { split_data += "}"; } count++; } return("{\r\n\"banco\": \"" + Auxiliars.AESEncrypt(bank, private_key) + "\",\r" + "\n\"factura\": \"" + Auxiliars.AESEncrypt(invoice, private_key) + "\",\r" + "\n\"descripcion\": \"" + Auxiliars.AESEncrypt(description, private_key) + "\",\r" + "\n\"valor\": \"" + Auxiliars.AESEncrypt(value, private_key) + "\",\r" + "\n\"iva\": \"" + Auxiliars.AESEncrypt(tax, private_key) + "\",\r" + "\n\"baseiva\": \"" + Auxiliars.AESEncrypt(tax_base, private_key) + "\",\r" + "\n\"moneda\": \"" + Auxiliars.AESEncrypt(currency, private_key) + "\",\r" + "\n\"tipo_persona\": \"" + Auxiliars.AESEncrypt(type_person, private_key) + "\",\r" + "\n\"tipo_doc\": \"" + Auxiliars.AESEncrypt(doc_type, private_key) + "\",\r" + "\n\"documento\": \"" + Auxiliars.AESEncrypt(doc_number, private_key) + "\",\r" + "\n\"nombres\": \"" + Auxiliars.AESEncrypt(name, private_key) + "\",\r" + "\n\"apellidos\": \"" + Auxiliars.AESEncrypt(last_name, private_key) + "\",\r" + "\n\"email\": \"" + Auxiliars.AESEncrypt(email, private_key) + "\",\r" + "\n\"pais\": \"" + Auxiliars.AESEncrypt(country, private_key) + "\",\r" + "\n\"celular\": \"" + Auxiliars.AESEncrypt(cell_phone, private_key) + "\",\r" + "\n\"url_respuesta\": \"" + Auxiliars.AESEncrypt(url_response, private_key) + "\",\r" + "\n\"url_confirmacion\": \"" + Auxiliars.AESEncrypt(url_confirmation, private_key) + "\",\r" + "\n\"metodoconfirmacion\": \"" + Auxiliars.AESEncrypt(method_confirmation, private_key) + "\",\r" + "\n\"splitpayment\": \"" + Auxiliars.AESEncrypt(splitpayment, private_key) + "\",\r" + "\n\"split_app_id\": \"" + Auxiliars.AESEncrypt(split_app_id, private_key) + "\",\r" + "\n\"split_merchant_id\": \"" + Auxiliars.AESEncrypt(split_merchant_id, private_key) + "\",\r" + "\n\"split_type\": \"" + Auxiliars.AESEncrypt(split_type, private_key) + "\",\r" + "\n\"split_primary_receiver\": \"" + Auxiliars.AESEncrypt(split_primary_receiver, private_key) + "\",\r" + "\n\"split_primary_receiver_fee\": \"" + Auxiliars.AESEncrypt(split_primary_receiver_fee, private_key) + "\",\r" + "\n\"split_receivers\": \"" + Auxiliars.AESEncrypt(split_data, private_key) + "\",\r" + "\n\"extra1\": \"" + Auxiliars.AESEncrypt(extra1, private_key) + "\",\r" + "\n\"extra2\": \"" + Auxiliars.AESEncrypt(extra2, private_key) + "\",\r" + "\n\"extra3\": \"" + Auxiliars.AESEncrypt(extra3, private_key) + "\",\r" + "\n\"extra4\": \"" + Auxiliars.AESEncrypt(extra4, private_key) + "\",\r" + "\n\"extra5\": \"" + Auxiliars.AESEncrypt(extra5, private_key) + "\",\r" + "\n\"extra6\": \"" + Auxiliars.AESEncrypt(extra6, private_key) + "\",\r" + "\n\"extra7\": \"" + Auxiliars.AESEncrypt(extra7, private_key) + "\",\r" + "\n\"public_key\": \"" + public_key + "\",\r" + "\n\"enpruebas\": \"" + test + "\",\r" + "\n\"ip\": \"" + localIP + "\",\r" + "\n\"i\": \"" + I + "\",\r" + "\n\"lenguaje\": \"" + ".net" + "\"\r\n}"); }
public string getBodyBankCreateSplit( string I, bool test, string public_key, string private_key, string bank, string invoice, string description, string value, string tax, string tax_base, string ico, string currency, string type_person, string doc_type, string doc_number, string name, string last_name, string email, string country, string cell_phone, string url_response, string url_confirmation, string method_confirmation, string splitpayment, string split_app_id, string split_merchant_id, string split_type, string split_rule, string split_primary_receiver, string split_primary_receiver_fee, List <SplitReceivers> split_receivers, string extra1, string extra2, string extra3, string extra4, string extra5, string extra6, string extra7, string extra8, string extra9, string extra10) { var localIP = ""; var split_receivers_json = Newtonsoft.Json.JsonConvert.SerializeObject(split_receivers); IPHostEntry host = Dns.GetHostEntry(Dns.GetHostName()); localIP = host.AddressList.First(i => i.AddressFamily.ToString() == "InterNetwork").ToString(); return("{\r\n\"banco\": \"" + Auxiliars.AESEncrypt(bank, private_key) + "\",\r" + "\n\"factura\": \"" + Auxiliars.AESEncrypt(invoice, private_key) + "\",\r" + "\n\"descripcion\": \"" + Auxiliars.AESEncrypt(description, private_key) + "\",\r" + "\n\"valor\": \"" + Auxiliars.AESEncrypt(value, private_key) + "\",\r" + "\n\"iva\": \"" + Auxiliars.AESEncrypt(tax, private_key) + "\",\r" + "\n\"baseiva\": \"" + Auxiliars.AESEncrypt(tax_base, private_key) + "\",\r" + "\n\"ico\": \"" + Auxiliars.AESEncrypt(ico, private_key) + "\",\r" + "\n\"moneda\": \"" + Auxiliars.AESEncrypt(currency, private_key) + "\",\r" + "\n\"tipo_persona\": \"" + Auxiliars.AESEncrypt(type_person, private_key) + "\",\r" + "\n\"tipo_doc\": \"" + Auxiliars.AESEncrypt(doc_type, private_key) + "\",\r" + "\n\"documento\": \"" + Auxiliars.AESEncrypt(doc_number, private_key) + "\",\r" + "\n\"nombres\": \"" + Auxiliars.AESEncrypt(name, private_key) + "\",\r" + "\n\"apellidos\": \"" + Auxiliars.AESEncrypt(last_name, private_key) + "\",\r" + "\n\"email\": \"" + Auxiliars.AESEncrypt(email, private_key) + "\",\r" + "\n\"pais\": \"" + Auxiliars.AESEncrypt(country, private_key) + "\",\r" + "\n\"celular\": \"" + Auxiliars.AESEncrypt(cell_phone, private_key) + "\",\r" + "\n\"url_respuesta\": \"" + Auxiliars.AESEncrypt(url_response, private_key) + "\",\r" + "\n\"url_confirmacion\": \"" + Auxiliars.AESEncrypt(url_confirmation, private_key) + "\",\r" + "\n\"metodoconfirmacion\": \"" + Auxiliars.AESEncrypt(method_confirmation, private_key) + "\",\r" + "\n\"splitpayment\": \"" + Auxiliars.AESEncrypt(splitpayment, private_key) + "\",\r" + "\n\"split_app_id\": \"" + Auxiliars.AESEncrypt(split_app_id, private_key) + "\",\r" + "\n\"split_merchant_id\": \"" + Auxiliars.AESEncrypt(split_merchant_id, private_key) + "\",\r" + "\n\"split_type\": \"" + Auxiliars.AESEncrypt(split_type, private_key) + "\",\r" + "\n\"split_rule\": \"" + Auxiliars.AESEncrypt(split_rule, private_key) + "\",\r" + "\n\"split_primary_receiver\": \"" + Auxiliars.AESEncrypt(split_primary_receiver, private_key) + "\",\r" + "\n\"split_primary_receiver_fee\": \"" + Auxiliars.AESEncrypt(split_primary_receiver_fee, private_key) + "\",\r" + "\n\"split_receivers\": \"" + Auxiliars.AESEncrypt(split_receivers_json, private_key) + "\",\r" + "\n\"extra1\": \"" + Auxiliars.AESEncrypt(extra1, private_key) + "\",\r" + "\n\"extra2\": \"" + Auxiliars.AESEncrypt(extra2, private_key) + "\",\r" + "\n\"extra3\": \"" + Auxiliars.AESEncrypt(extra3, private_key) + "\",\r" + "\n\"extra4\": \"" + Auxiliars.AESEncrypt(extra4, private_key) + "\",\r" + "\n\"extra5\": \"" + Auxiliars.AESEncrypt(extra5, private_key) + "\",\r" + "\n\"extra6\": \"" + Auxiliars.AESEncrypt(extra6, private_key) + "\",\r" + "\n\"extra7\": \"" + Auxiliars.AESEncrypt(extra7, private_key) + "\",\r" + "\n\"extra8\": \"" + Auxiliars.AESEncrypt(extra8, private_key) + "\",\r" + "\n\"extra9\": \"" + Auxiliars.AESEncrypt(extra9, private_key) + "\",\r" + "\n\"extra10\": \"" + Auxiliars.AESEncrypt(extra10, private_key) + "\",\r" + "\n\"public_key\": \"" + public_key + "\",\r" + "\n\"enpruebas\": \"" + Auxiliars.AESEncrypt(test.ToString(), private_key) + "\",\r" + "\n\"ip\": \"" + Auxiliars.AESEncrypt(localIP, private_key) + "\",\r" + "\n\"i\": \"" + I + "\",\r" + "\n\"lenguaje\": \"" + ".net" + "\"\r\n}"); }
/* * PSE */ public string getBodyBankCreate( string I, bool test, string public_key, string private_key, string bank, string invoice, string description, string value, string tax, string tax_base, string currency, string type_person, string doc_type, string doc_number, string name, string last_name, string email, string country, string cell_phone, string url_response, string url_confirmation, string method_confirmation, string extra1 = "", string extra2 = "", string extra3 = "", string extra4 = "", string extra5 = "", string extra6 = "", string extra7 = "") { var localIP = ""; IPHostEntry host = Dns.GetHostEntry(Dns.GetHostName()); localIP = host.AddressList.First(i => i.AddressFamily.ToString() == "InterNetwork").ToString(); return("{\r\n\"banco\": \"" + Auxiliars.AESEncrypt(bank, private_key) + "\",\r" + "\n\"factura\": \"" + Auxiliars.AESEncrypt(invoice, private_key) + "\",\r" + "\n\"descripcion\": \"" + Auxiliars.AESEncrypt(description, private_key) + "\",\r" + "\n\"valor\": \"" + Auxiliars.AESEncrypt(value, private_key) + "\",\r" + "\n\"iva\": \"" + Auxiliars.AESEncrypt(tax, private_key) + "\",\r" + "\n\"baseiva\": \"" + Auxiliars.AESEncrypt(tax_base, private_key) + "\",\r" + "\n\"moneda\": \"" + Auxiliars.AESEncrypt(currency, private_key) + "\",\r" + "\n\"tipo_persona\": \"" + Auxiliars.AESEncrypt(type_person, private_key) + "\",\r" + "\n\"tipo_doc\": \"" + Auxiliars.AESEncrypt(doc_type, private_key) + "\",\r" + "\n\"documento\": \"" + Auxiliars.AESEncrypt(doc_number, private_key) + "\",\r" + "\n\"nombres\": \"" + Auxiliars.AESEncrypt(name, private_key) + "\",\r" + "\n\"apellidos\": \"" + Auxiliars.AESEncrypt(last_name, private_key) + "\",\r" + "\n\"email\": \"" + Auxiliars.AESEncrypt(email, private_key) + "\",\r" + "\n\"pais\": \"" + Auxiliars.AESEncrypt(country, private_key) + "\",\r" + "\n\"celular\": \"" + Auxiliars.AESEncrypt(cell_phone, private_key) + "\",\r" + "\n\"url_respuesta\": \"" + Auxiliars.AESEncrypt(url_response, private_key) + "\",\r" + "\n\"url_confirmacion\": \"" + Auxiliars.AESEncrypt(url_confirmation, private_key) + "\",\r" + "\n\"metodoconfirmacion\": \"" + Auxiliars.AESEncrypt(method_confirmation, private_key) + "\",\r" + "\n\"extra1\": \"" + Auxiliars.AESEncrypt(extra1, private_key) + "\",\r" + "\n\"extra2\": \"" + Auxiliars.AESEncrypt(extra2, private_key) + "\",\r" + "\n\"extra3\": \"" + Auxiliars.AESEncrypt(extra3, private_key) + "\",\r" + "\n\"extra4\": \"" + Auxiliars.AESEncrypt(extra4, private_key) + "\",\r" + "\n\"extra5\": \"" + Auxiliars.AESEncrypt(extra5, private_key) + "\",\r" + "\n\"extra6\": \"" + Auxiliars.AESEncrypt(extra6, private_key) + "\",\r" + "\n\"extra7\": \"" + Auxiliars.AESEncrypt(extra7, private_key) + "\",\r" + "\n\"public_key\": \"" + public_key + "\",\r" + "\n\"enpruebas\": \"" + Auxiliars.AESEncrypt(test.ToString(), private_key) + "\",\r" + "\n\"ip\": \"" + Auxiliars.AESEncrypt(localIP, private_key) + "\",\r" + "\n\"i\": \"" + I + "\",\r" + "\n\"lenguaje\": \"" + ".net" + "\"\r\n}"); }