Closed
Description
I tried to send an invoice, but got the notice:
PHP Notice: Array to string conversion in .../src/ApiClient.php on line 106
And receive unsuccessful response from telegram.
Example
$invoice = SendInvoiceMethod::create(
$telegramAccount->getTelegramId(),
'title',
'description',
'payload',
'token',
'startParameter',
'USD',
[LabeledPriceType::create('label', 234)]
);
$bot->sendInvoice($invoice);
When ApiClient try to createStreamBody it cast value (array) as string:
foreach ($request->getData() as $name => $value) {
// todo [GreenPlugin] fix type cast and replace it to normalizer
$stream .= $this->createDataStream($boundary, $name, (string) $value);
}