node-telegram-bot-api
node-telegram-bot-api copied to clipboard
sendInvoice issue
When I use a test payment, I get a Timeout. I need to finish the script execution. After test payment, I need to get a receipt and also on SuccessfulPayment bot should sendMessage.
Question test this bot: @mydevUp_bot He'res my code:
` bot.on('callback_query', query => { const queryData = query.message.chat.id
if (query.data == 'pay_button') {
bot.sendMessage(queryData, 'Some text')
bot.sendInvoice(
queryData,
'Вы покупаете: AuDi',
'Описание: Best car ever',
'payload',
'410694247:TEST:29bec3ba-9c21-4356-861a-e42acefbdbbb',
'Some_RANDOM_KEY',
'UAH',
[
{
label: 'AuDis',
amount: '1000'
}
],
{
photo_url: 'https://i.ytimg.com/vi/2cebMGt8R_M/maxresdefault.jpg'
}
)
}
})
`
This could be your code related issue.