1. Go to this page and download the library: Download rasa/telekit library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
class Hi extends Trigger {
public function __construct($request)
{
$this->reply_message('Hi');
}
}
namespace Triggers;
class Help extends Trigger {
public function __construct($request)
{
$this->sendMessage()
->chat_id($request['message']['chat']['id'])
->text('Помощь')
->send();
}
}
$this->send_invoice()
->title('Subscription')
->description("Buy subscription for an month.")
->payload('Subscription: month')
->currency('USD')
->prices(['label' => 'Subscription for an month', 'amount' => 100000])
->send();
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.