Skip to content

Commit d874416

Browse files
committed
show receipt
1 parent c8c0482 commit d874416

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

ytdlbot/ytdl_bot.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -264,15 +264,16 @@ def vip_handler(client: "Client", message: "types.Message"):
264264
bm.edit_text(msg)
265265

266266

267-
def generate_invoice(amount: "int", title: "str", description: "str", payload: "bytes"):
267+
def generate_invoice(amount: "int", title: "str", description: "str", payload: "str"):
268268
invoice = raw_types.input_media_invoice.InputMediaInvoice(
269269
invoice=(
270270
raw_types.invoice.Invoice(currency="USD", prices=[raw_types.LabeledPrice(label="price", amount=amount)])),
271271
title=title,
272272
description=description,
273273
provider=PROVIDER_TOKEN,
274274
provider_data=raw_types.DataJSON(data="{}"),
275-
payload=payload,
275+
payload=payload.encode(),
276+
start_param=payload
276277
)
277278
return invoice
278279

@@ -283,7 +284,7 @@ def topup_handler(client: "Client", message: "types.Message"):
283284
chat_id = message.chat.id
284285
client.send_chat_action(chat_id, "typing")
285286
invoice = generate_invoice(100, bot_text.topup_title, bot_text.topup_description,
286-
f"{message.chat.id}-topup".encode())
287+
f"{message.chat.id}-topup")
287288

288289
app.send(
289290
functions.messages.SendMedia(

0 commit comments

Comments
 (0)