@@ -795,7 +795,8 @@ public function setWebhook(
795795 string $ ip_address = '' ,
796796 int $ max_connections = 0 ,
797797 array $ allowed_updates = [],
798- bool $ drop_pending_updates = false
798+ bool $ drop_pending_updates = false ,
799+ string $ secret_token = ''
799800 ): array
800801 {
801802 $ requestBody = ['url ' => $ url ];
@@ -809,6 +810,8 @@ public function setWebhook(
809810 $ requestBody ['allowed_updates ' ] = json_encode ($ allowed_updates );
810811 if ($ drop_pending_updates )
811812 $ requestBody ['drop_pending_updates ' ] = $ drop_pending_updates ;
813+ if ($ secret_token != '' )
814+ $ requestBody ['secret_token ' ] = $ secret_token ;
812815
813816 return $ this ->endpoint ('setWebhook ' , $ requestBody , true );
814817 }
@@ -1291,6 +1294,18 @@ public function sendInvoice(array $content): array
12911294 return $ this ->endpoint ('sendInvoice ' , $ content );
12921295 }
12931296
1297+ /**
1298+ * See <a href="https://core.telegram.org/bots/api#createInvoiceLink">createInvoiceLink</a> for the input values.
1299+ *
1300+ * @param $content array the request parameters as array
1301+ *
1302+ * @return array the JSON Telegram's reply.
1303+ */
1304+ public function createInvoiceLink (array $ content ): array
1305+ {
1306+ return $ this ->endpoint ('createInvoiceLink ' , $ content );
1307+ }
1308+
12941309 /**
12951310 * See <a href="https://core.telegram.org/bots/api#answershippingquery">answerShippingQuery</a> for the input values.
12961311 *
0 commit comments