🧾 Userbotsiz Business Chatbot bilan
https://t.me/HUMOcardbot da avto to'lov yaratish
☑️
https://t.me/HUMOcardbot ga humo kartangizni ulaysiz
ℹ️ Ishga tushirish: botni
https://t.me/botfather dan settings bolimidan rasmdagi ikkitasini yoqasiz va botni Business Chatbot ga ulaysiz
💩 Kodni ishlatish
$url = "http://sizning-sayt.uz/api.php";
$post_data = [
'type' => 'create',
'amount' => '1000',
'order_id' => 'order_' . time(),
'url' => 'https://example.com/webhook', // Agar tolov bo'lsa shu url ga tolov boldi deb post yuboradi
'post' => json_encode([
'user_id' => 123,
'amount' => 1000,
'description' => "To'lov"
]) // Ko'rsatilgan url ga qanday post yuborish
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
curl_setopt($ch, CURLOPT_POST, true);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
print_r($result);
Checkni tekshirish
$check_code = $result['check_code'] ?? 'sizning_check_codingiz';
$post_data = [
'type' => 'checking',
'check_code' => $check_code
];
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, $url);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POSTFIELDS, $post_data);
curl_setopt($ch, CURLOPT_POST, true);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
print_r($result);
© Dasturchi:
https://t.me/cysze