Tigran преди 3 години
родител
ревизия
16388e157e

+ 2 - 9
CardCollector/Commands/CallbackQuery/BuyGemsQuery.cs

@@ -14,15 +14,8 @@ namespace CardCollector.Commands.CallbackQuery
         {
             await User.ClearChat();
             var messages = await MessageController.SendInvoice(User, Text.gems_title, Text.gems_description, 
-                Command.gems50, new[]
-                {
-                    new LabeledPrice(Text.gems_label50, 100),
-                    new LabeledPrice(Text.gems_label100, 200),
-                    new LabeledPrice(Text.gems_label250, 500),
-                    new LabeledPrice(Text.gems_label500, 1000),
-                    new LabeledPrice(Text.gems_label1000, 2000),
-                    new LabeledPrice(Text.gems_label2500, 5000),
-                });
+                Command.gems50, new[] {new LabeledPrice(Text.gems_label50, 100)},
+                1000000, new [] {500, 1000, 2500, 5000});
             User.Session.Messages.Add(messages.MessageId);
         }
 

+ 2 - 2
CardCollector/Controllers/MessageController.cs

@@ -234,13 +234,13 @@ namespace CardCollector.Controllers
         }
 
         public static async Task<TgMessage> SendInvoice(UserEntity user, string title, string description, 
-            string payload, IEnumerable<LabeledPrice> prices, Currency currency = Currency.USD)
+            string payload, IEnumerable<LabeledPrice> prices, int maxTip = 0, IEnumerable<int> tips = null, Currency currency = Currency.USD)
         {
             try
             {
                 if (!user.IsBlocked)
                     return await Bot.Client.SendInvoiceAsync(user.ChatId, title, description, payload, 
-                        AppSettings.PAYMENT_PROVIDER, currency.ToString(), prices, disableNotification: true);
+                        AppSettings.PAYMENT_PROVIDER, currency.ToString(), prices, maxTip, tips, disableNotification: true);
             }
             catch (Exception e)
             {

+ 1 - 1
CardCollector/Resources/Text.Designer.cs

@@ -322,7 +322,7 @@ namespace CardCollector.Resources {
         }
         
         /// <summary>
-        ///   Looks up a localized string similar to После покупки вы получите 50 алмазов на свой счет.
+        ///   Looks up a localized string similar to После покупки вы получите 50 алмазов на свой счет. Вы также можете оставить чаевые. Вы получите алмазы в рассчете $1 за 50💎.
         /// </summary>
         internal static string gems_description {
             get {

+ 1 - 1
CardCollector/Resources/Text.resx

@@ -217,7 +217,7 @@
         <value>50 алмазов</value>
     </data>
     <data name="gems_description" xml:space="preserve">
-        <value>После покупки вы получите 50 алмазов на свой счет</value>
+        <value>После покупки вы получите 50 алмазов на свой счет. Вы также можете оставить чаевые. Вы получите алмазы в рассчете $1 за 50💎</value>
     </data>
     <data name="gems_label50" xml:space="preserve">
         <value>50💎</value>