node-telegram-bot-api icon indicating copy to clipboard operation
node-telegram-bot-api copied to clipboard

sendInvoice issue

Open Bohdan177 opened this issue 6 years ago • 1 comments

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'
        }


    )

}

})

`

Bohdan177 avatar Dec 25 '19 21:12 Bohdan177

This could be your code related issue.

kamikazechaser avatar Dec 28 '19 07:12 kamikazechaser