Cryptocurrency payment gateway for telegram bots and websites – Telegram Group

Telegram

Cryptocurrency payment gateway for telegram bots and websites

composer require sarani/cryptopay

Cryptobot main menu
Cryptobot Main menu
Created App Menu
# init
$cryp_payment_token = 'token';
$mode = ''; // empty for real account
$crypto = new Sarani\CryptoPay\Api($cryp_payment_token, $mode);
# create invoice, return Invoices object 
$inv = $crypto->createInvoice($params = [
'asset' => 'USDT',
'amount' => '2.50',
'payload' => '11158', # subscription id
'allow_comments' => False,
'allow_anonymous' => True,
'paid_btn_name' => 'openBot',
'paid_btn_url' => 'https://t.me/demobot',
'hidden_message' => 'Thanks for your payment',
'description' => 'Monthly Subscription'
]);
echo $inv->id();
echo $inv->url();

url is the link that the user can click on it and it will open the telegram cryptobot bot where user can pay the invoice.

# get invoice, return array of Invoices object 
$res = $crypto->getInvoices($params = [
'asset' => 'TON', // Crypto symbols
'invoice_ids' => '12600,12626,12745', // ids seperated by comma
]);
# webhook, return Webhook object with Update and Invoice 
$hook = new Sarani\CryptoPay\Webhook();
$update = $hook->getUpdate(); // Update object
$nvoice = $update->getPayload(); // Invoice Object
echo( $nvoice->status());

Ten articles before and after

Day 2 – Telegram Group

data-rh=”true”>I like programming. The process of creating something from a few lines fascinates me. Most of all I like Data Science. Today I studied the creation of a bot in a Telegram. I write on a python using… – Mikhail Popov – Medium – Telegram Group

(My Notes) Telegram Bot <pyTelegramBotAPI> – Telegram Group

Let’s Make A Telegram Bot With Node.js – Telegram Group

Best Autoresponder for Telegram to set auto reply messages – Telegram Group

Metatrader +Python +Telegram. Metatrader is a popular platform for… – Telegram Group

How to automatically and repeatedly send messages in Telegram groups (every few minutes or hours) – Telegram Group

How I Create “Sembako Bot” using Google Cloud – Telegram Group

Bots! What are they? Let’s make a Telegram Bot [Part -1] – Telegram Group

Making our First Telegram Bot [Part -2] – Telegram Group

About Me

Pretium lorem primis senectus habitasse lectus donec ultricies tortor adipiscing fusce morbi volutpat pellentesque consectetur risus curae malesuada dignissim lacus convallis massa mauris.