Skip to content

Commit

Permalink
deploy: a5b9913
Browse files Browse the repository at this point in the history
  • Loading branch information
wiz0u committed Aug 20, 2024
1 parent 746496c commit dcd1eb9
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 6 deletions.
7 changes: 5 additions & 2 deletions 4/payments.html
Original file line number Diff line number Diff line change
Expand Up @@ -263,8 +263,8 @@ <h1 id="bot-payments-api--telegram-stars"><a class="header" href="#bot-payments-
<li><strong>Physical Goods</strong>, which can be paid using real money, and can request more details like a shipping address.</li>
</ul>
<p>Both process are similar, so we will demonstrate how to do a Telegram Stars payment (simpler) and give you some info about the difference for Physical Goods.</p>
<h2 id="important-preliminary-notes"><a class="header" href="#important-preliminary-notes">Important preliminary notes</a></h2>
<p>For physical goods, before starting, you need to talk to <a href="https://t.me/BotFather">@BotFather</a>, select one of the supported
<h2 id="important-notes-for-physical-goods"><a class="header" href="#important-notes-for-physical-goods">Important notes for physical goods</a></h2>
<p>Before starting, you need to talk to <a href="https://t.me/BotFather">@BotFather</a>, select one of the supported
<a href="https://core.telegram.org/bots/payments#supported-payment-providers">Payment providers</a>
(you need to open an account on the provider website), and complete the connection procedure
linking your bot with your provider account.</p>
Expand Down Expand Up @@ -356,6 +356,9 @@ <h2 id="full-example-code-for-telegram-stars-transaction"><a class="header" href
case { Message.SuccessfulPayment: { } successfulPayment }:
if (successfulPayment.InvoicePayload is "unlock_X")
await bot.SendTextMessageAsync(update.Message.Chat, "Thank you! Feature X is unlocked");
System.IO.File.AppendAllText("payments.log", $"\n{DateTime.Now}: User {update.Message.From} " +
$"paid for {successfulPayment.InvoicePayload}: " +
$"{successfulPayment.ProviderPaymentChargeId} {successfulPayment.TelegramPaymentChargeId}");
break;
};
}
Expand Down
7 changes: 5 additions & 2 deletions print.html
Original file line number Diff line number Diff line change
Expand Up @@ -4455,8 +4455,8 @@ <h1 id="bot-payments-api--telegram-stars"><a class="header" href="#bot-payments-
<li><strong>Physical Goods</strong>, which can be paid using real money, and can request more details like a shipping address.</li>
</ul>
<p>Both process are similar, so we will demonstrate how to do a Telegram Stars payment (simpler) and give you some info about the difference for Physical Goods.</p>
<h2 id="important-preliminary-notes"><a class="header" href="#important-preliminary-notes">Important preliminary notes</a></h2>
<p>For physical goods, before starting, you need to talk to <a href="https://t.me/BotFather">@BotFather</a>, select one of the supported
<h2 id="important-notes-for-physical-goods"><a class="header" href="#important-notes-for-physical-goods">Important notes for physical goods</a></h2>
<p>Before starting, you need to talk to <a href="https://t.me/BotFather">@BotFather</a>, select one of the supported
<a href="https://core.telegram.org/bots/payments#supported-payment-providers">Payment providers</a>
(you need to open an account on the provider website), and complete the connection procedure
linking your bot with your provider account.</p>
Expand Down Expand Up @@ -4548,6 +4548,9 @@ <h2 id="full-example-code-for-telegram-stars-transaction"><a class="header" href
case { Message.SuccessfulPayment: { } successfulPayment }:
if (successfulPayment.InvoicePayload is "unlock_X")
await bot.SendTextMessageAsync(update.Message.Chat, "Thank you! Feature X is unlocked");
System.IO.File.AppendAllText("payments.log", $"\n{DateTime.Now}: User {update.Message.From} " +
$"paid for {successfulPayment.InvoicePayload}: " +
$"{successfulPayment.ProviderPaymentChargeId} {successfulPayment.TelegramPaymentChargeId}");
break;
};
}
Expand Down
2 changes: 1 addition & 1 deletion searchindex.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion searchindex.json

Large diffs are not rendered by default.

0 comments on commit dcd1eb9

Please sign in to comment.