- Set up Tor container for SOCKS proxy (port 9050) - Configured Monero wallet with remote onion node - Bitcoin node continues syncing in background (60% complete) - Created documentation for wallet configuration steps - All external connections routed through Tor for privacy BTCPay requires manual wallet configuration through web interface: - Bitcoin: Need to add xpub/zpub for watch-only wallet - Monero: Need to add address and view key System ready for payment acceptance once wallets configured.
73 lines
2.6 KiB
C#
73 lines
2.6 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Threading.Tasks;
|
|
using LittleShop.Client.Models;
|
|
using Microsoft.Extensions.Configuration;
|
|
using Microsoft.Extensions.Logging;
|
|
using Microsoft.Extensions.Logging.Abstractions;
|
|
using TeleBot.Services;
|
|
|
|
namespace TeleBot
|
|
{
|
|
/// <summary>
|
|
/// Simple test class to verify carousel functionality
|
|
/// This can be used for testing the ProductCarouselService
|
|
/// </summary>
|
|
public class TestCarousel
|
|
{
|
|
public static async Task TestImageValidation()
|
|
{
|
|
var config = new ConfigurationBuilder().Build();
|
|
var logger = NullLogger<ProductCarouselService>.Instance;
|
|
var httpClient = new System.Net.Http.HttpClient();
|
|
|
|
var carouselService = new ProductCarouselService(config, logger, httpClient);
|
|
|
|
// Test image URL validation
|
|
var validUrls = new[]
|
|
{
|
|
"https://via.placeholder.com/300x200.jpg",
|
|
"https://picsum.photos/300/200",
|
|
"https://httpbin.org/image/jpeg"
|
|
};
|
|
|
|
foreach (var url in validUrls)
|
|
{
|
|
var isValid = await carouselService.IsImageUrlValidAsync(url);
|
|
Console.WriteLine($"URL {url} is valid: {isValid}");
|
|
}
|
|
}
|
|
|
|
public static async Task TestProductImage()
|
|
{
|
|
var config = new ConfigurationBuilder().Build();
|
|
var logger = NullLogger<ProductCarouselService>.Instance;
|
|
var httpClient = new System.Net.Http.HttpClient();
|
|
|
|
var carouselService = new ProductCarouselService(config, logger, httpClient);
|
|
|
|
// Create a test product with image
|
|
var testProduct = new Product
|
|
{
|
|
Id = Guid.NewGuid(),
|
|
Name = "Test Product",
|
|
Price = 29.99m,
|
|
Description = "A test product for carousel functionality",
|
|
Photos = new List<ProductPhoto>
|
|
{
|
|
new ProductPhoto
|
|
{
|
|
Id = Guid.NewGuid(),
|
|
Url = "https://via.placeholder.com/300x200.jpg",
|
|
SortOrder = 0 // Use SortOrder = 0 to indicate main photo
|
|
}
|
|
}
|
|
};
|
|
|
|
// Test getting product image
|
|
var image = await carouselService.GetProductImageAsync(testProduct);
|
|
Console.WriteLine($"Product image retrieved: {image != null}");
|
|
}
|
|
}
|
|
}
|