This repository was archived by the owner on Sep 2, 2025. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 66
77use unreal4u \TelegramAPI \Abstracts \TelegramMethods ;
88use unreal4u \TelegramAPI \Telegram \Types \Inline \Keyboard \Markup ;
9+ use unreal4u \TelegramAPI \Telegram \Types \LabeledPrice ;
910
1011/**
1112 * Use this method to send invoices. On success, the sent Message is returned.
1213 *
13- * Objects defined as-is May 2017
14+ * Objects defined as-is november 2017
1415 *
1516 * @see https://core.telegram.org/bots/api#sendinvoice
1617 */
@@ -66,6 +67,15 @@ class SendInvoice extends TelegramMethods
6667 */
6768 public $ prices = [];
6869
70+ /**
71+ * Array data about the invoice, which will be shared with the payment provider. A detailed description of
72+ * required fields should be provided by the payment provider.
73+ *
74+ * The conversion to JSON-encoded string will be handled by the class itself.
75+ * @var array
76+ */
77+ public $ provider_data ;
78+
6979 /**
7080 * Optional. URL of the product photo for the invoice. Can be a photo of the goods or a marketing image for a
7181 * service. People like it better when they see what they are paying for
@@ -152,6 +162,10 @@ public function performSpecialConditions(): TelegramMethods
152162 $ this ->prices = json_encode ($ this ->prices );
153163 }
154164
165+ if (!empty ($ this ->provider_data )) {
166+ $ this ->provider_data = json_encode ($ this ->provider_data );
167+ }
168+
155169 return parent ::performSpecialConditions ();
156170 }
157171
You can’t perform that action at this time.
0 commit comments