New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
function createInvoiceLink not exist #1184
Comments
Your example @tieudat is not a full example... So normal that dont works, you dont create a instance. Only import the api, but you need to use it. This is basic example: // Import the library
const TelegramBot = require('node-telegram-bot-api');
// Replace the value below with the Telegram token you receive from @BotFather
const token = 'YOUR_TELEGRAM_BOT_TOKEN';
// Create bot that uses 'polling' to fetch new updates
const bot = new TelegramBot(token);
// Now call the function
const title = 'Invoice link product';
const description = 'Our test invoice link product';
const payload = 'sku-p002';
const providerToken = XXXXX.....; // Token of your payment provider get it form botfather bot config
const currency = 'EUR';
const prices = [{ label: 'NTBA API', amount: 12000 }, { label: 'tax', amount: 10000 }];
bot.createInvoiceLink(title, description, payload, providerToken, currency, prices).then(resp => {
console.log("Invoice Link", resp)
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I don't use function createInvoiceLink in TelegramBot => My code: const TelegramBot = require("node-telegram-bot-api");
The text was updated successfully, but these errors were encountered: