//MONGO CONEXION
$mongoDBKey = 'mongodb+srv://edudj:489148edu@cluster0.x03tn.mongodb.net/?retryWrites=true&w=majority';
$conexion = new MongoDB\Client($mongoDBKey);
$dbMongo = $conexion->selectDatabase('cluster0');
?>
define("urlWeb", "https://".str_replace("www.","",$_SERVER['HTTP_HOST'])."/");
define("nameWeb", $_SERVER['HTTP_HOST']);
define("domain", $_SERVER['HTTP_HOST']);
$config_precio_suscripcion = 22;
$config_precio_suscripcion_USD = 22;
$urlWeb = urlWeb;
$lang = "es";
if($_SERVER['HTTP_HOST'] == "rechargement.fr" || $_SERVER['HTTP_HOST'] == "www.rechargement.fr") {
$lang = "fr";
}
else if($_SERVER['HTTP_HOST'] == "rechargenumber.com" || $_SERVER['HTTP_HOST'] == "www.rechargenumber.com") {
$lang = "en";
}
else if($_SERVER['HTTP_HOST'] == "herlaad.nl" || $_SERVER['HTTP_HOST'] == "www.herlaad.nl") {
$lang = "nl";
}
else if($_SERVER['HTTP_HOST'] == "karteprepaid.de" || $_SERVER['HTTP_HOST'] == "www.karteprepaid.de") {
$lang = "de";
}
else if (strpos($_SERVER['HTTP_HOST'], 'ricarica.shop') !== false) {
$lang = "it";
}
else if (strpos($_SERVER['HTTP_HOST'], 'ricariche.shop') !== false) {
$lang = "it";
}
else if($_SERVER['HTTP_HOST'] == "ricaricamobile.online" || $_SERVER['HTTP_HOST'] == "www.ricaricamobile.online") {
$lang = "it";
}
else if($_SERVER['HTTP_HOST'] == "ricaricacredito.it" || $_SERVER['HTTP_HOST'] == "www.ricaricacredito.it") {
$lang = "it";
}
else if($_SERVER['HTTP_HOST'] == "carregarsaldo.pt" || $_SERVER['HTTP_HOST'] == "www.carregarsaldo.pt") {
$lang = "pt";
}
if(isset($_GET['lang']) && isset($_GET['lang_change'])) {
$lang = $_GET['lang'];
setcookie("lang", $_GET['lang'], time()+31536000,'/',domain, 1, 1);
$url = strtok($_SERVER["REQUEST_URI"], '?');
// Reconstruir query string sin "lang"
if (!empty($_GET)) {
$params = $_GET;
unset($params['lang']); // quitar param lang
if (!empty($params)) {
$url .= '?' . http_build_query($params);
}
}
// Redirigir
header("Location: $url");
}
if(isset($_COOKIE['lang'])) {
$lang = $_COOKIE['lang'];
}
if(isset($_GET['lang']) && isset($_GET['force_lang'])) {
$lang = $_GET['lang'];
}
if(!isset($noIncludeLang)) {
include($_SERVER['DOCUMENT_ROOT'].'/includes/lang/'.$lang.'.php');
}
$lenguajesDisponibles = array(
"es" => array(
"nombre" => "Español",
"dominio" => "recargasaldo.es",
"flag" => urlWeb.'img/country/6533b150aeb4240970017b82/50-spain.jpg',
"hreflang" => "es-ES",
"url_operador" => "operador",
"url_operadores" => "operador",
"url_paises" => "pais",
"url_pais" => "pais",
"url_contact" => "contacto",
"logo_texto" => "recargasaldo.es",
"gtag" => '
',
"gtag_conversion" => ' ',
"chat_code" => '
',
"remite_sms" => "RECARGA",
),
"fr" => array(
"nombre" => "Français",
"dominio" => "rechargement.fr",
"flag" => "https://s3.amazonaws.com/rld-flags/fr.svg",
"hreflang" => "fr-FR",
"url_operador" => "acheter",
"url_operadores" => "compagnies",
"url_paises" => "pays",
"url_pais" => "pays",
"url_contact" => "contact",
"logo_texto" => "rechargement.fr",
"gtag" => "",
"gtag_conversion" => '',
"chat_code" => '
',
"remite_sms" => "RECHARGE",
),
"en" => array(
"nombre" => "English",
"dominio" => "rechargenumber.com",
"flag" => "https://s3.amazonaws.com/rld-flags/gb.svg",
"hreflang" => "en",
"url_operador" => "topup",
"url_operadores" => "topup",
"url_paises" => "country",
"url_pais" => "country",
"url_contact" => "contact",
"logo_texto" => "rechargenumber",
"gtag" => "",
"gtag_conversion" => '',
"chat_code" => '
',
"remite_sms" => "RECHARGE",
),
"de" => array(
"nombre" => "Deutsch",
"dominio" => "karteprepaid.de",
"flag" => "https://s3.amazonaws.com/rld-flags/de.svg",
"hreflang" => "de",
"url_operador" => "aufladen",
"url_operadores" => "aufladen",
"url_paises" => "land",
"url_pais" => "lander",
"url_contact" => "contact",
"logo_texto" => "karteprepaid.de",
"logo_texto" => "recargasaldo.es",
"gtag" => "",
"gtag_action" => '',
"chat_code" => '
',
"remite_sms" => "RECHARGE",
),
"it" => array(
"nombre" => "Italiano",
"dominio" => "ricarica.shop",
"flag" => urlWeb."img/country/6533b14daeb4240970017b4d/50-italy.png",
"hreflang" => "it",
"url_operador" => "ricaricare",
"url_operadores" => "ricaricare",
"url_paises" => "internazionale",
"url_pais" => "ricarica",
"url_contact" => "contact",
"logo_texto" => "ricarica.shop",
"gtag" => "
",
"gtag_conversion" => "
",
"chat_code" => '
',
"remite_sms" => "RICARICA",
),
"pt" => array(
"nombre" => "Portugues",
"dominio" => "carregarsaldo.pt",
"flag" => "https://s3.amazonaws.com/rld-flags/pt.svg",
"hreflang" => "pt",
"url_operador" => "recarregar",
"url_operadores" => "recarregar",
"url_paises" => "internacional",
"url_pais" => "recarrega",
"url_contact" => "contact",
"logo_texto" => "carregarsaldo.pt",
"gtag" => "",
"gtag_conversion" => '',
"chat_code" => '
',
"remite_sms" => "RECHARGE",
),
);
$codigosGTAG = array(
"ricaricamobile.com" => '
'
);
if($_SERVER['HTTP_HOST'] == "ricaricacredito.it" || $_SERVER['HTTP_HOST'] == "www.ricaricacredito.it") {
$lenguajesDisponibles['it']['logo_texto'] = "ricaricacredito.it";
}
if($_SERVER['HTTP_HOST'] == "ricaricacellulare.com" || $_SERVER['HTTP_HOST'] == "www.ricaricacellulare.com") {
$lenguajesDisponibles['it']['logo_texto'] = "ricaricacellulare.com";
}
if ($_SERVER['HTTP_HOST'] === 'recargarsaldo.com' || substr($_SERVER['HTTP_HOST'], -strlen('.recargarsaldo.com')) === '.recargarsaldo.com') {
$lenguajesDisponibles['es']['logo_texto'] = "recargarsaldo.com";
$lenguajesDisponibles['es']['gtag'] = '
';
$lenguajesDisponibles['es']['gtag_conversion'] = '
';
}
if($_SERVER['HTTP_HOST'] == "ricaricamobile.online" || $_SERVER['HTTP_HOST'] == "www.ricaricamobile.online") {
$lenguajesDisponibles['it']['logo_texto'] = "ricaricamobile";
$lenguajesDisponibles['it']['gtag'] = '';
}
$configTarjetaPago = array(
"numero" => "5167609120001538",
"mes" => "01",
"ano" => "30",
"cvc" => "510",
"nombre" => "Luis",
"apellido" => "Eduardo"
);
//ICARD
//$configTarjetaPagoIliad2 = array(
// "numero" => "4537550003688353",
// "mes" => "05",
// "ano" => "26",
// "cvc" => "576",
// "nombre" => "Luis",
// "apellido" => "Eduardo"
//);
//$tarjetasIcard = array();
//$tarjetasIcard[] = array(
// "numero" => "5227140746396704",
// "mes" => "05",
// "ano" => "26",
// "cvc" => "114",
// "nombre" => "Luis",
// "apellido" => "Eduardo"
//);
//$tarjetasIcard[] = array(
// "numero" => "4537550007782905",
// "mes" => "05",
// "ano" => "26",
// "cvc" => "917",
// "nombre" => "Luis",
// "apellido" => "Eduardo"
//);
//$tarjetasIcard[] = array(
// "numero" => "4537550007212069",
// "mes" => "05",
// "ano" => "26",
// "cvc" => "428",
// "nombre" => "Luis",
// "apellido" => "Eduardo"
//);
//$tarjetasIcard[] = array(
// "numero" => "4537550009096627",
// "mes" => "05",
// "ano" => "26",
// "cvc" => "725",
// "nombre" => "Luis",
// "apellido" => "Eduardo"
//);
//$tarjetasIcard[] = array(
// "numero" => "4537550006475147",
// "mes" => "05",
// "ano" => "26",
// "cvc" => "130",
// "nombre" => "Luis",
// "apellido" => "Eduardo"
//);
//$tarjetasIcard[] = array(
// "numero" => "4537550009753144",
// "mes" => "05",
// "ano" => "26",
// "cvc" => "002",
// "nombre" => "Luis",
// "apellido" => "Eduardo"
//);
//$tarjetasIcard[] = array(
// "numero" => "4537550009316504",
// "mes" => "05",
// "ano" => "26",
// "cvc" => "606",
// "nombre" => "Luis",
// "apellido" => "Eduardo"
//);
//$tarjetasIcard[] = array(
// "numero" => "4537550002527602",
// "mes" => "05",
// "ano" => "26",
// "cvc" => "638",
// "nombre" => "Luis",
// "apellido" => "Eduardo"
//);
//$tarjetasIcard[] = array(
// "numero" => "4537550007970914",
// "mes" => "05",
// "ano" => "26",
// "cvc" => "243",
// "nombre" => "Luis",
// "apellido" => "Eduardo"
//);
//$tarjetasIcard[] = array(
// "numero" => "4537550002807921",
// "mes" => "05",
// "ano" => "26",
// "cvc" => "446",
// "nombre" => "Luis",
// "apellido" => "Eduardo"
//);
//$tarjetasIcard[] = array(
// "numero" => "4537550009317833",
// "mes" => "05",
// "ano" => "26",
// "cvc" => "373",
// "nombre" => "Luis",
// "apellido" => "Eduardo"
//);
//$tarjetasIcard[] = array(
// "numero" => "4537550007535923",
// "mes" => "05",
// "ano" => "26",
// "cvc" => "123",
// "nombre" => "Luis",
// "apellido" => "Eduardo"
//);
//$tarjetasIcard[] = array(
// "numero" => "4537550002949590",
// "mes" => "06",
// "ano" => "26",
// "cvc" => "125",
// "nombre" => "Luis",
// "apellido" => "Eduardo"
//);
//$tarjetasIcard[] = array(
// "numero" => "4537550008904714",
// "mes" => "06",
// "ano" => "26",
// "cvc" => "823",
// "nombre" => "Luis",
// "apellido" => "Eduardo"
//);
//$tarjetasIcard[] = array(
// "numero" => "4537550009343722",
// "mes" => "06",
// "ano" => "26",
// "cvc" => "687",
// "nombre" => "Luis",
// "apellido" => "Eduardo"
//);
//$tarjetasIcard[] = array(
// "numero" => "4537550005574858",
// "mes" => "06",
// "ano" => "26",
// "cvc" => "274",
// "nombre" => "Luis",
// "apellido" => "Eduardo"
//);
//$tarjetasIcard[] = array(
// "numero" => "4537550005511116",
// "mes" => "06",
// "ano" => "26",
// "cvc" => "008",
// "nombre" => "Luis",
// "apellido" => "Eduardo"
//);
//$tarjetasIcard[] = array(
// "numero" => "4537550003313606",
// "mes" => "06",
// "ano" => "26",
// "cvc" => "451",
// "nombre" => "Luis",
// "apellido" => "Eduardo"
//);
//$tarjetasIcard[] = array(
// "numero" => "4537550004185185",
// "mes" => "06",
// "ano" => "26",
// "cvc" => "539",
// "nombre" => "Luis",
// "apellido" => "Eduardo"
//);
//QONTO
$tarjetasIcard[] = array(
"numero" => "5117680254594029",
"mes" => "03",
"ano" => "28",
"cvc" => "778",
"nombre" => "Luis",
"apellido" => "Eduardo"
);
$tarjetasIcard[] = array(
"numero" => "5117680263582031",
"mes" => "12",
"ano" => "28",
"cvc" => "281",
"nombre" => "Luis",
"apellido" => "Eduardo"
);
$tarjetasIcard[] = array(
"numero" => "5117680253955361",
"mes" => "02",
"ano" => "28",
"cvc" => "572",
"nombre" => "Luis",
"apellido" => "Eduardo"
);
$tarjetasIcard[] = array(
"numero" => "5117680252286214",
"mes" => "09",
"ano" => "28",
"cvc" => "675",
"nombre" => "Luis",
"apellido" => "Eduardo"
);
$tarjetasIcard[] = array(
"numero" => "5117680260644743",
"mes" => "01",
"ano" => "28",
"cvc" => "488",
"nombre" => "Luis",
"apellido" => "Eduardo"
);
$tarjetasIcard[] = array(
"numero" => "5117680258598745",
"mes" => "09",
"ano" => "28",
"cvc" => "006",
"nombre" => "Luis",
"apellido" => "Eduardo"
);
$tarjetasIcard[] = array(
"numero" => "5117680253529901",
"mes" => "10",
"ano" => "28",
"cvc" => "379",
"nombre" => "Luis",
"apellido" => "Eduardo"
);
$tarjetasIcard[] = array(
"numero" => "5117680259527644",
"mes" => "01",
"ano" => "28",
"cvc" => "489",
"nombre" => "Luis",
"apellido" => "Eduardo"
);
$tarjetasIcard[] = array(
"numero" => "5117680252652233",
"mes" => "09",
"ano" => "28",
"cvc" => "874",
"nombre" => "Luis",
"apellido" => "Eduardo"
);
$tarjetasIcard[] = array(
"numero" => "5117680254386913",
"mes" => "02",
"ano" => "28",
"cvc" => "800",
"nombre" => "Luis",
"apellido" => "Eduardo"
);
$tarjetasIcard[] = array(
"numero" => "5117680253204646",
"mes" => "12",
"ano" => "28",
"cvc" => "824",
"nombre" => "Luis",
"apellido" => "Eduardo"
);
$tarjetasIcard[] = array(
"numero" => "5117680263206094",
"mes" => "12",
"ano" => "28",
"cvc" => "734",
"nombre" => "Luis",
"apellido" => "Eduardo"
);
$tarjetasIcard[] = array(
"numero" => "5117680264593979",
"mes" => "10",
"ano" => "28",
"cvc" => "826",
"nombre" => "Luis",
"apellido" => "Eduardo"
);
$tarjetasIcard[] = array(
"numero" => "5438653622508288",
"mes" => "02",
"ano" => "29",
"cvc" => "395",
"nombre" => "Luis",
"apellido" => "Eduardo"
);
$tarjetasIcard[] = array(
"numero" => "5438653616690845",
"mes" => "06",
"ano" => "29",
"cvc" => "142",
"nombre" => "Luis",
"apellido" => "Eduardo"
);
$indiceAleatorio = array_rand($tarjetasIcard);
$configTarjetaPagoIliad = $tarjetasIcard[$indiceAleatorio];
//REVOLUT
//$configTarjetaPagoIliad = array(
// "numero" => "5167609120748021",
// "mes" => "01",
// "ano" => "30",
// "cvc" => "076",
// "nombre" => "Luis",
// "apellido" => "Eduardo"
//);
//PIBANK
//$configTarjetaPagoIliad = array(
// "numero" => "4165500000080459",
// "mes" => "12",
// "ano" => "28",
// "cvc" => "904",
// "nombre" => "Eduardo",
// "apellido" => "Rodriguez"
//);
$ip = $_SERVER['REMOTE_ADDR'];
$urlWeb = "https://".$_SERVER['HTTP_HOST']."/";
$urlMobile = "https://".$_SERVER['HTTP_HOST']."/";
$themeColor = '#000000';
$minutosDuracionSesion = 20;
$configDescuento = 25;
$variableCache = '';
$variableCache = '?v='.rand(0,999999);
//RECARGAS
$modoPruebas = false;
if($_SERVER['REMOTE_ADDR'] == "81.39.133.45--") {
$modoPruebas = true;
}
if($modoPruebas == false) {
//REAL
$stripeApiKey = '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';
$stripePublicable = 'pk_live_51O58vmK6DKNW8vtXNs0cGMFmL6NPWUNmuPhrf3IC7mc03kqsFxByHsDVhcLXMy7cerBPcbSt57QN2FFXdXdO2Kp100HUtcCzeA';
$payPalClientId = 'ATEK9eHdDtsIZgTeFxlf_649h01ntgoGw7Zx_owd00bNILLJ4r7yrskqccGLGlCKBUYbjVY_sss3SY-z';
$payPalSecret = 'EOA23mAcS_7s0TucVC1P1ne59vHVTB9QrcCX7_le-XG4jRCiCMRV52cRR4-xQC_d-2HKv3ElNLEbe8ww';
$sandboxPaypal = "";
$configAudiencia = "https://topups.reloadly.com";
$configTopupClient = "5WWgMYP7cfIB7LYPaK3kypQhqgzfYo7R";
$configTopupClientSecret = "CdvhbxYD2v-ka3eVqYaDlbcgKOZF7X-gRQNCT996BzCqTFI6TYH83eUGuFAYge5";
}
else {
//PRUEBAS
$stripeApiKey = 'sk_test_51O58vmK6DKNW8vtXswvpSlaTO8lND4RMu1k3Jb0vFVpYNrsIzXB8uLdpJIdrJ8F9PpQP2nPPnx8UAX8O4l5711D300dDDKOnG1';
$stripePublicable = 'pk_test_51O58vmK6DKNW8vtXil2iDepDOBIr68i7flIyvQrGvvUgx7vBg35IznzGfKVQrbQChDx2XNKKYuyP0ooWz01dviMw00u4PkC0EU';
$payPalClientId = 'AVUlpV4HrWb3_nO3aTTyrHqUmuxvqG71HNrTOmjBzMR1vvZUiGf3sah2jDP61W1fo1z7j3HxKRpbmA9v';
$payPalSecret = 'EI5hvzX9KwIavlpq7ns2lvOdTsoDiISo0fkAuhLW6DXHUOju6t-8VKNw5_yfhUFqeH5RJU1qRtaOyss5';
$sandboxPaypal = ".sandbox";
$configAudiencia = "https://topups-sandbox.reloadly.com";
$configTopupClient = "5633g5kalS2Xg25ms5jNxv5N7JrEP0xQ";
$configTopupClientSecret = "CIjxnG2xqF-WsZe8VHzjbQ7yJ7LxxT-t965D3Niv75GLXeGHqHpjSUroERh56oQ";
}
//GIFTCARDS
$modoPruebasGiftcards = false;
if($modoPruebasGiftcards == false) {
//REAL
$stripeApiKeyGiftcards = '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';
$stripePublicableGiftcards = 'pk_live_51O58vmK6DKNW8vtXNs0cGMFmL6NPWUNmuPhrf3IC7mc03kqsFxByHsDVhcLXMy7cerBPcbSt57QN2FFXdXdO2Kp100HUtcCzeA';
$configAudienciaGiftcards = "https://giftcards.reloadly.com";
$configTopupClientGiftcards = "5WWgMYP7cfIB7LYPaK3kypQhqgzfYo7R";
$configTopupClientSecretGiftcards = "CdvhbxYD2v-ka3eVqYaDlbcgKOZF7X-gRQNCT996BzCqTFI6TYH83eUGuFAYge5";
}
else {
//PRUEBAS
$stripeApiKeyGiftcards = 'sk_test_51Oc5qLKNl4WQKHvFQNf4DFtrYS3AiczSIjg1VE4Dk842QkLl7I2mtjCltMbout1IBMZymUwJMs9CcOjbNV7u67Ly00zI5IfYrL';
$stripePublicableGiftcards = 'pk_test_51Oc5qLKNl4WQKHvFOqXRxvE4IeQswIM7U2LLcmqUSd09DirydeoRu0FIQlzrPdjZ0jr8sMzvO16L0A0m1ZM4R1LB007qjJs9Gh';
$configAudienciaGiftcards = "https://giftcards-sandbox.reloadly.com";
$configTopupClientGiftcards = "5633g5kalS2Xg25ms5jNxv5N7JrEP0xQ";
$configTopupClientSecretGiftcards = "CIjxnG2xqF-WsZe8VHzjbQ7yJ7LxxT-t965D3Niv75GLXeGHqHpjSUroERh56oQ";
}
$apiGoogleTranslate = 'AIzaSyD3wdop4OiCqcMgm4QRL9Vmsywg09SXdxc';
//LOGUEADO
function isLogged() {
global $dbMongo;
$return = false;
if(isset($_COOKIE['user_email']) && isset($_COOKIE['user_id']) && isset($_COOKIE['user_hash'])) {
$filterQuery =
array(
'$and' => array(
array(
"email" => $_COOKIE['user_email']
),
array(
"_id" => new \MongoDB\BSON\ObjectID($_COOKIE['user_id'])
)
,
array(
"hash" => $_COOKIE['user_hash']
)
)
);
$dataUsuario = $dbMongo->clientes->findOne($filterQuery);
if($dataUsuario) {
$return = $dataUsuario;
}
else {
setcookie("user_email", NULL, time()-10,'/',domain, 1, 1);
setcookie("user_pass", NULL, time()-10,'/',domain, 1, 1);
}
}
return $return;
}
//ESTADOS
$config_ArrayEstados = array(
"Pendiente", //0
"Realizada", //1
"En espera", //2
"Fallida", //3
"Reembolsada",//4
"Destinatario incorrecto",//5
"Fallido", //POR BOBO 6
"Problema técnico", //7,
"Recientemente recargado", //8
"Espera suscripcion", //9
"Espera cancelación" //10
);
//API EMAILS
$data_Api_Emails = array(
"contact@rechargenumber.com" => array(
"domain" => 'rechargenumber.com',
"host" => "smtp.mandrillapp.com",
"puerto" => 587,
"user" => "Eduardo",
"clave" => "md-Soaoqj-stIdrYa-EA-Dfhg",
"clave2" => ""
),
// "websolutionsesp@gmail.com" => array(
// "domain" => 'ricarica.shop',
// "host" => "smtp-relay.brevo.com",
// "puerto" => 587,
// "user" => "97d13a001@smtp-brevo.com",
// "clave" => "93t6SYbNCRfXarAL",
// "clave2" => "xsmtpsib-297efebc4f5835757730be1f7488b454aa17b27bf18a6ac596c666eb6e46e32d-Fmq3X1ErgkhGH2tA"
// )
);
?>