Unverified Commit d61262bf authored by Armando Lüscher's avatar Armando Lüscher Committed by GitHub

Merge pull request #731 from noplanman/fix_payments

Fix payment related entity relations and types.
parents 3e7af92f bddf5825
......@@ -9,6 +9,7 @@ Exclamation symbols (:exclamation:) note something of importance e.g. breaking c
### Deprecated
### Removed
### Fixed
- Entity relations and wrong types for payments.
### Security
## [0.51.0] - 2017-12-05
......
......@@ -22,7 +22,7 @@ use Longman\TelegramBot\Exception\TelegramException;
* @method string getCallbackData() Optional. Data to be sent in a callback query to the bot when button is pressed, 1-64 bytes
* @method string getSwitchInlineQuery() Optional. If set, pressing the button will prompt the user to select one of their chats, open that chat and insert the bot's username and the specified inline query in the input field. Can be empty, in which case just the bot’s username will be inserted.
* @method string getSwitchInlineQueryCurrentChat() Optional. If set, pressing the button will insert the bot‘s username and the specified inline query in the current chat's input field. Can be empty, in which case only the bot’s username will be inserted.
* @method string getPay() Optional. Specify True, to send a Pay button.
* @method bool getPay() Optional. Specify True, to send a Pay button.
*
* @method $this setText(string $text) Label text on the button
* @method $this setUrl(string $url) Optional. HTTP url to be opened when button is pressed
......
......@@ -37,7 +37,7 @@ class PreCheckoutQuery extends Entity
public function subEntities()
{
return [
'user' => User::class,
'from' => User::class,
'order_info' => OrderInfo::class,
];
}
......
......@@ -43,18 +43,6 @@ class ShippingOption extends Entity
*/
public function getPrices()
{
$all_prices = [];
if ($these_prices = $this->getProperty('prices')) {
foreach ($these_prices as $prices) {
$new_prices = [];
foreach ($prices as $price) {
$new_prices[] = new LabeledPrice($price);
}
$all_prices[] = $new_prices;
}
}
return $all_prices;
return $this->makePrettyObjectArray(LabeledPrice::class, 'prices');
}
}
......@@ -34,7 +34,7 @@ class ShippingQuery extends Entity
public function subEntities()
{
return [
'user' => User::class,
'from' => User::class,
'shipping_address' => ShippingAddress::class,
];
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment