diff --git a/TeleBot/TeleBot/Handlers/CallbackHandler.cs b/TeleBot/TeleBot/Handlers/CallbackHandler.cs index ce635c8..2b8e969 100644 --- a/TeleBot/TeleBot/Handlers/CallbackHandler.cs +++ b/TeleBot/TeleBot/Handlers/CallbackHandler.cs @@ -615,12 +615,22 @@ namespace TeleBot.Handlers session.State = SessionState.CheckoutFlow; - // Send new message for checkout instead of editing + // Send new message for checkout - collect all details at once await bot.SendTextMessageAsync( message.Chat.Id, - "📦 *Checkout - Step 1/5*\n\n" + - "Please enter your shipping name:\n\n" + - "_Reply to this message with your name_", + "📦 *Checkout - Delivery Details*\n\n" + + "Please provide all delivery details in one message:\n\n" + + "• Full Name\n" + + "• Street Address\n" + + "• City\n" + + "• Post/Zip Code\n" + + "• Country (or leave blank for UK)\n\n" + + "_Example:_\n" + + "`John Smith\n" + + "123 Main Street\n" + + "London\n" + + "SW1A 1AA\n" + + "United Kingdom`", parseMode: Telegram.Bot.Types.Enums.ParseMode.Markdown ); } diff --git a/TeleBot/TeleBot/UI/MessageFormatter.cs b/TeleBot/TeleBot/UI/MessageFormatter.cs index d9facb8..2eb9189 100644 --- a/TeleBot/TeleBot/UI/MessageFormatter.cs +++ b/TeleBot/TeleBot/UI/MessageFormatter.cs @@ -290,7 +290,8 @@ namespace TeleBot.UI { sb.AppendLine($" Address: `{payment.WalletAddress}`"); } - sb.AppendLine($" Amount: {payment.RequiredAmount}"); + var cryptoAmount = payment.CryptoAmount > 0 ? payment.CryptoAmount.ToString("F8") : payment.RequiredAmount.ToString("F2"); + sb.AppendLine($" Amount: {cryptoAmount} {FormatCurrency(payment.Currency)}"); } } @@ -300,14 +301,20 @@ namespace TeleBot.UI public static string FormatPayment(CryptoPayment payment) { var sb = new StringBuilder(); - + sb.AppendLine($"💰 *Payment Instructions*\n"); sb.AppendLine($"*Currency:* {FormatCurrency(payment.Currency)}"); - sb.AppendLine($"*Amount:* `{payment.RequiredAmount}`"); + // Show crypto amount if available, otherwise show the order amount with note + var cryptoAmount = payment.CryptoAmount > 0 ? payment.CryptoAmount.ToString("F8") : payment.RequiredAmount.ToString("F2"); + sb.AppendLine($"*Amount:* `{cryptoAmount} {FormatCurrency(payment.Currency)}`"); + if (payment.CryptoAmount <= 0) + { + sb.AppendLine($"*Order Total:* £{payment.RequiredAmount:F2} (awaiting rate conversion)"); + } sb.AppendLine($"*Status:* {FormatPaymentStatus(payment.Status)}"); sb.AppendLine($"*Expires:* {payment.ExpiresAt:yyyy-MM-dd HH:mm} UTC"); - - sb.AppendLine($"\n*Send exactly {payment.RequiredAmount} {FormatCurrency(payment.Currency)} to:*"); + + sb.AppendLine($"\n*Send exactly {cryptoAmount} {FormatCurrency(payment.Currency)} to:*"); sb.AppendLine($"`{payment.WalletAddress}`"); if (!string.IsNullOrEmpty(payment.BTCPayCheckoutUrl))