mirror of
https://github.com/MarshalX/telegram-crawler.git
synced 2024-12-29 07:52:37 +01:00
Update content of files
This commit is contained in:
parent
09ca0e8a0b
commit
b5270579df
4 changed files with 34 additions and 8 deletions
|
@ -67,9 +67,16 @@
|
|||
<h4><a class="anchor" href="#invoice-closed" id="invoice-closed" name="invoice-closed"><i class="anchor-icon"></i></a><code>invoice_closed</code></h4>
|
||||
<p>Params: JSON object with the following fields:</p>
|
||||
<ul>
|
||||
<li><code>slug</code> - Invoice slug</li>
|
||||
<li><code>status</code> - </li>
|
||||
<li><code>slug</code> - Invoice identifier</li>
|
||||
<li><code>status</code> - One of the following values:<ul>
|
||||
<li><code>paid</code> – The invoice was paid successfully</li>
|
||||
<li><code>cancelled</code> – The user closed this invoice without paying</li>
|
||||
<li><code>failed</code> – The user tried to pay, but the payment was failed</li>
|
||||
<li><code>pending</code> – The payment is still processing. The bot will receive a service message about a successful payment when the payment is successfully paid.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<p>Sent by the client to report the payment status of an invoice obtained from a <a href="/api/web-events#web_app_open_invoice"><code>web_app_open_invoice</code> event</a>. </p>
|
||||
<h4><a class="anchor" href="#viewport-changed" id="viewport-changed" name="viewport-changed"><i class="anchor-icon"></i></a><code>viewport_changed</code></h4>
|
||||
<p>Params: a JSON object with the following fields:</p>
|
||||
<ul>
|
||||
|
@ -149,8 +156,8 @@
|
|||
<p>Normal webapps can be opened from:</p>
|
||||
<ul>
|
||||
<li>A <a href="/constructor/keyboardButtonWebView">keyboardButtonWebView</a> button contained in an inline keyboard identified by a <a href="/constructor/replyInlineMarkup">replyInlineMarkup</a> constructor</li>
|
||||
<li>A <a href="/constructor/botMenuButton">botMenuButton</a> <a href="/api/bots/menu">menu button »</a></li>
|
||||
<li>An <a href="/api/bots/attach">attachment menu »</a></li>
|
||||
<li>A <a href="/constructor/botMenuButton">botMenuButton</a> <a href="/api/bots/menu">menu button »</a> (in this case the <a href="/method/messages.requestSimpleWebView">messages.requestWebView</a>.<code>from_bot_menu</code> flag should be set)</li>
|
||||
<li>An <a href="/api/bots/attach">attachment menu »</a> (in this case the <a href="/method/messages.requestSimpleWebView">messages.requestWebView</a>.<code>start_attach</code> flag should be populated)</li>
|
||||
</ul>
|
||||
<p>To open them, clients should call <a href="/method/messages.requestSimpleWebView">messages.requestWebView</a>, and then open a webview using the <code>url</code> contained in the returned <a href="/constructor/webViewResultUrl">webViewResultUrl</a>. </p>
|
||||
<p>After loading the webview, until it is closed by a <a href="/api/web-events#web_app_close">web_app_close event</a>, the user client must invoke <a href="/method/messages.prolongWebView">messages.prolongWebView</a> every 60 seconds. </p>
|
||||
|
|
|
@ -815,6 +815,7 @@ tg://resolve?domain=<bot_username>&startgroup&admin=<permission
|
|||
</tbody>
|
||||
</table>
|
||||
<h3><a class="anchor" href="#invoice-links" id="invoice-links" name="invoice-links"><i class="anchor-icon"></i></a>Invoice links</h3>
|
||||
<p>Used to initiate <a href="/api/payments">payment of an invoice »</a>.</p>
|
||||
<p><code>t.me</code> syntax:</p>
|
||||
<pre><code>t.me/invoice/<slug>
|
||||
t.me/$<slug></code></pre>
|
||||
|
@ -833,7 +834,7 @@ t.me/$<slug></code></pre>
|
|||
<tr>
|
||||
<td><code>slug</code></td>
|
||||
<td style="text-align: center;">Required</td>
|
||||
<td></td>
|
||||
<td>The invoice slug to be passed to <a href="/method/payments.getPaymentForm">payments.getPaymentForm</a> with an <a href="/constructor/inputInvoiceSlug">inputInvoiceSlug</a>.</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
|
|
@ -94,7 +94,10 @@ You can also attach an inline keyboard to the message using the <code>reply_mark
|
|||
<p>The <a href="/constructor/message">message</a> will also have a <a href="/constructor/replyInlineMarkup">replyInlineMarkup</a> keyboard attached to it.
|
||||
The the first button of the keyboard will always be a <a href="/constructor/keyboardButtonBuy">keyboardButtonBuy</a> button.</p>
|
||||
<h4><a class="anchor" href="#22-getting-invoice-info-about-the-product" id="22-getting-invoice-info-about-the-product" name="22-getting-invoice-info-about-the-product"><i class="anchor-icon"></i></a>2.2 Getting invoice info about the product</h4>
|
||||
<pre><code><a href='/constructor/invoice'>invoice</a>#3e85a91b flags:<a href='/type/%23'>#</a> test:flags.0?<a href='/constructor/true'>true</a> name_requested:flags.1?<a href='/constructor/true'>true</a> phone_requested:flags.2?<a href='/constructor/true'>true</a> email_requested:flags.3?<a href='/constructor/true'>true</a> shipping_address_requested:flags.4?<a href='/constructor/true'>true</a> flexible:flags.5?<a href='/constructor/true'>true</a> phone_to_provider:flags.6?<a href='/constructor/true'>true</a> email_to_provider:flags.7?<a href='/constructor/true'>true</a> recurring:flags.9?<a href='/constructor/true'>true</a> currency:<a href='/type/string'>string</a> prices:<a href='/type/Vector%20t'>Vector</a><<a href='/type/LabeledPrice'>LabeledPrice</a>> max_tip_amount:flags.8?<a href='/type/long'>long</a> suggested_tip_amounts:flags.8?<a href='/type/Vector%20t'>Vector</a><<a href='/type/long'>long</a>> recurring_terms_url:flags.9?<a href='/type/string'>string</a> = <a href='/type/Invoice'>Invoice</a>;
|
||||
<pre><code><a href='/constructor/inputInvoiceMessage'>inputInvoiceMessage</a>#c5b56859 peer:<a href='/type/InputPeer'>InputPeer</a> msg_id:<a href='/type/int'>int</a> = <a href='/type/InputInvoice'>InputInvoice</a>;
|
||||
<a href='/constructor/inputInvoiceSlug'>inputInvoiceSlug</a>#c326caef slug:<a href='/type/string'>string</a> = <a href='/type/InputInvoice'>InputInvoice</a>;
|
||||
|
||||
<a href='/constructor/invoice'>invoice</a>#3e85a91b flags:<a href='/type/%23'>#</a> test:flags.0?<a href='/constructor/true'>true</a> name_requested:flags.1?<a href='/constructor/true'>true</a> phone_requested:flags.2?<a href='/constructor/true'>true</a> email_requested:flags.3?<a href='/constructor/true'>true</a> shipping_address_requested:flags.4?<a href='/constructor/true'>true</a> flexible:flags.5?<a href='/constructor/true'>true</a> phone_to_provider:flags.6?<a href='/constructor/true'>true</a> email_to_provider:flags.7?<a href='/constructor/true'>true</a> recurring:flags.9?<a href='/constructor/true'>true</a> currency:<a href='/type/string'>string</a> prices:<a href='/type/Vector%20t'>Vector</a><<a href='/type/LabeledPrice'>LabeledPrice</a>> max_tip_amount:flags.8?<a href='/type/long'>long</a> suggested_tip_amounts:flags.8?<a href='/type/Vector%20t'>Vector</a><<a href='/type/long'>long</a>> recurring_terms_url:flags.9?<a href='/type/string'>string</a> = <a href='/type/Invoice'>Invoice</a>;
|
||||
|
||||
<a href='/constructor/paymentRequestedInfo'>paymentRequestedInfo</a>#909c3f94 flags:<a href='/type/%23'>#</a> name:flags.0?<a href='/type/string'>string</a> phone:flags.1?<a href='/type/string'>string</a> email:flags.2?<a href='/type/string'>string</a> shipping_address:flags.3?<a href='/type/PostAddress'>PostAddress</a> = <a href='/type/PaymentRequestedInfo'>PaymentRequestedInfo</a>;
|
||||
|
||||
|
@ -105,7 +108,19 @@ The the first button of the keyboard will always be a <a href="/constructor/keyb
|
|||
---functions---
|
||||
|
||||
<a href='/method/payments.getPaymentForm'>payments.getPaymentForm</a>#37148dbb flags:<a href='/type/%23'>#</a> invoice:<a href='/type/InputInvoice'>InputInvoice</a> theme_params:flags.0?<a href='/type/DataJSON'>DataJSON</a> = <a href='/type/payments.PaymentForm'>payments.PaymentForm</a>;</code></pre>
|
||||
<p>If the user clicks on the <a href="/constructor/keyboardButtonBuy">keyboardButtonBuy</a> button, the client proceeds to call <a href="/method/payments.getPaymentForm">payments.getPaymentForm</a> with the message ID of the invoice preview message to get the <a href="/constructor/payments.paymentForm">payment form</a>.</p>
|
||||
<p><a href="/method/payments.getPaymentForm">payments.getPaymentForm</a> is used to return a <a href="/constructor/payments.paymentForm">payment form</a> from an invoice, providing the following <code>invoice</code> parameter:</p>
|
||||
<ul>
|
||||
<li><a href="/constructor/inputInvoiceMessage">inputInvoiceMessage</a><ul>
|
||||
<li>Used if the user clicks on the <a href="/constructor/keyboardButtonBuy">keyboardButtonBuy</a> button, contains the message ID of the invoice preview message. </li>
|
||||
</ul>
|
||||
</li>
|
||||
<li><a href="/constructor/inputInvoiceSlug">inputInvoiceSlug</a><ul>
|
||||
<li>If the user opens an <a href="/api/links#invoice-links">invoice deep link</a> contains the <code>slug</code> parameter</li>
|
||||
<li>If the client receives a <a href="/api/web-events#web_app_open_invoice"><code>web_app_open_invoice</code> event from a web app</a></li>
|
||||
<li>If the client has to process a <a href="/api/premium">Telegram Premium</a> payment, using the <a href="/api/config#client-configuration"><code>premium_invoice_slug</code> app config parameter »</a></li>
|
||||
</ul>
|
||||
</li>
|
||||
</ul>
|
||||
<p>The returned form will contain fields that should be passed to the payment provider along with the full <a href="/constructor/invoice">invoice</a>.
|
||||
The payment form also contains info about previously saved payment credentials and order information (name, phone number, email, shipping address & so on).</p>
|
||||
<p>The full <a href="/constructor/invoice">invoice</a> contains info about the information required for the order, the price and the currency, and whether this is a <code>test</code> order.</p>
|
||||
|
|
|
@ -140,7 +140,10 @@ The GamingCommunication and bot web app libraries by default will use <code>'*'<
|
|||
<p>Event data: a JSON object with a string <code>path_full</code> field, containing the path+query component of a <a href="/api/links">t.me deep link</a>. </p>
|
||||
<p>Used to open a <a href="/api/links">t.me deep link</a>. The Web App will be closed.</p>
|
||||
<h4><a class="anchor" href="#web-app-open-invoice" id="web-app-open-invoice" name="web-app-open-invoice"><i class="anchor-icon"></i></a><code>web_app_open_invoice</code></h4>
|
||||
<p>Event data: a JSON object with a string <code>slug</code> field</p>
|
||||
<p>Event data: a JSON object with a string <code>slug</code> field.</p>
|
||||
<p>Used to initiate <a href="/api/payments">payment of an invoice »</a>, invoking <a href="/method/payments.getPaymentForm">payments.getPaymentForm</a> with an <a href="/constructor/inputInvoiceSlug">inputInvoiceSlug</a>, containing the <code>slug</code>.<br>
|
||||
The Web App will not be closed. </p>
|
||||
<p>The payment status should be reported back to the web app using <a href="/api/bots/webapps#invoice_closed">invoice_closed</a>.</p>
|
||||
<h4><a class="anchor" href="#web-app-expand" id="web-app-expand" name="web-app-expand"><i class="anchor-icon"></i></a><code>web_app_expand</code></h4>
|
||||
<p>No event payload.</p>
|
||||
<p>Expands the web app to the maximum available height.</p>
|
||||
|
|
Loading…
Reference in a new issue