Page Menu
Home
Phabricator (Chris)
Search
Configure Global Search
Log In
Files
F630483
PreCheckoutQuery.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Authored By
Unknown
Size
1 KB
Referenced Files
None
Subscribers
None
PreCheckoutQuery.php
View Options
<?php
/**
* This file is part of the TelegramBot package.
*
* (c) Avtandil Kikabidze aka LONGMAN <akalongman@gmail.com>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
namespace
Longman
\
TelegramBot
\
Entities
\
Payments
;
use
Longman
\
TelegramBot
\
Entities
\
Entity
;
use
Longman
\
TelegramBot
\
Entities
\
User
;
use
Longman
\
TelegramBot
\
Request
;
/**
* Class PreCheckoutQuery
*
* This object contains information about an incoming pre-checkout query.
*
* @link https://core.telegram.org/bots/api#precheckoutquery
*
* @method string getId() Unique query identifier
* @method User getFrom() User who sent the query
* @method string getCurrency() Three-letter ISO 4217 currency code
* @method int getTotalAmount() Total price in the smallest units of the currency (integer, not float/double).
* @method string getInvoicePayload() Bot specified invoice payload
* @method string getShippingOptionId() Optional. Identifier of the shipping option chosen by the user
* @method OrderInfo getOrderInfo() Optional. Order info provided by the user
**/
class
PreCheckoutQuery
extends
Entity
{
/**
* {@inheritdoc}
*/
public
function
subEntities
(
)
{
return
[
'user'
=>
User
::
class
,
'order_info'
=>
OrderInfo
::
class
,
]
;
}
/**
* Answer this pre-checkout query.
*
* @param bool $ok
* @param array $data
*
* @return \Longman\TelegramBot\Entities\ServerResponse
*/
public
function
answer
(
$ok
,
array
$data
=
[
]
)
{
return
Request
::
answerPreCheckoutQuery
(
array_merge
(
[
'pre_checkout_query_id'
=>
$this
->
getId
(
)
,
'ok'
=>
$ok
,
]
,
$data
)
)
;
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Sun, Nov 15, 9:37 AM (1 d, 6 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
152230
Default Alt Text
PreCheckoutQuery.php (1 KB)
Attached To
Mode
R123 php-telegram-bot
Attached
Detach File
Event Timeline