@@ -795,7 +795,8 @@ public function setWebhook(
795
795
string $ ip_address = '' ,
796
796
int $ max_connections = 0 ,
797
797
array $ allowed_updates = [],
798
- bool $ drop_pending_updates = false
798
+ bool $ drop_pending_updates = false ,
799
+ string $ secret_token = ''
799
800
): array
800
801
{
801
802
$ requestBody = ['url ' => $ url ];
@@ -809,6 +810,8 @@ public function setWebhook(
809
810
$ requestBody ['allowed_updates ' ] = json_encode ($ allowed_updates );
810
811
if ($ drop_pending_updates )
811
812
$ requestBody ['drop_pending_updates ' ] = $ drop_pending_updates ;
813
+ if ($ secret_token != '' )
814
+ $ requestBody ['secret_token ' ] = $ secret_token ;
812
815
813
816
return $ this ->endpoint ('setWebhook ' , $ requestBody , true );
814
817
}
@@ -1291,6 +1294,18 @@ public function sendInvoice(array $content): array
1291
1294
return $ this ->endpoint ('sendInvoice ' , $ content );
1292
1295
}
1293
1296
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
+
1294
1309
/**
1295
1310
* See <a href="https://core.telegram.org/bots/api#answershippingquery">answerShippingQuery</a> for the input values.
1296
1311
*
0 commit comments