- Updated Docker configuration for production deployment - Added SilverPay integration settings - Configured for admin.thebankofdebbie.giize.com deployment - Includes all recent security fixes and improvements 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
305 lines
20 KiB
Plaintext
305 lines
20 KiB
Plaintext
@model LittleShop.Areas.Admin.Controllers.SystemSettingsViewModel
|
|
@{
|
|
ViewData["Title"] = "System Settings";
|
|
}
|
|
|
|
<div class="container-fluid">
|
|
<div class="row">
|
|
<div class="col-12">
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<h3 class="card-title">System Settings</h3>
|
|
</div>
|
|
<div class="card-body">
|
|
@if (TempData["Success"] != null)
|
|
{
|
|
<div class="alert alert-success alert-dismissible fade show" role="alert">
|
|
@TempData["Success"]
|
|
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
|
</div>
|
|
}
|
|
|
|
@if (TempData["Warning"] != null)
|
|
{
|
|
<div class="alert alert-warning alert-dismissible fade show" role="alert">
|
|
@TempData["Warning"]
|
|
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
|
</div>
|
|
}
|
|
|
|
@if (TempData["Error"] != null)
|
|
{
|
|
<div class="alert alert-danger alert-dismissible fade show" role="alert">
|
|
@TempData["Error"]
|
|
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
|
</div>
|
|
}
|
|
|
|
@if (!string.IsNullOrEmpty(ViewBag.Success))
|
|
{
|
|
<div class="alert alert-success alert-dismissible fade show" role="alert">
|
|
@ViewBag.Success
|
|
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
|
</div>
|
|
}
|
|
|
|
@if (!string.IsNullOrEmpty(ViewBag.Error))
|
|
{
|
|
<div class="alert alert-danger alert-dismissible fade show" role="alert">
|
|
@ViewBag.Error
|
|
<button type="button" class="btn-close" data-bs-dismiss="alert" aria-label="Close"></button>
|
|
</div>
|
|
}
|
|
|
|
<form asp-controller="SystemSettings" asp-action="UpdateTestCurrencies" method="post">
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<h5 class="card-title">Test Currencies</h5>
|
|
<p class="card-subtitle text-muted">
|
|
Enable test currencies for development and testing purposes.
|
|
These currencies are only available when enabled here.
|
|
</p>
|
|
</div>
|
|
<div class="card-body">
|
|
@foreach (var currency in Model.TestCurrencies)
|
|
{
|
|
<div class="form-check mb-3">
|
|
<input class="form-check-input"
|
|
type="checkbox"
|
|
name="TestCurrencies[@currency.Key]"
|
|
value="true"
|
|
@(currency.Value ? "checked" : "")
|
|
id="currency-@currency.Key">
|
|
<input type="hidden" name="TestCurrencies[@currency.Key]" value="false">
|
|
<label class="form-check-label" for="currency-@currency.Key">
|
|
<strong>@currency.Key</strong>
|
|
@{
|
|
string description = currency.Key switch
|
|
{
|
|
"TBTC" => "Test Bitcoin - Bitcoin testnet currency for development",
|
|
"TLTC" => "Test Litecoin - Litecoin testnet currency for development",
|
|
_ => "Test cryptocurrency"
|
|
};
|
|
}
|
|
<br><small class="text-muted">@description</small>
|
|
</label>
|
|
</div>
|
|
}
|
|
|
|
<div class="mt-3">
|
|
<button type="submit" class="btn btn-primary">
|
|
<i class="fas fa-save"></i> Update Test Currencies
|
|
</button>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<div class="col-md-6">
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<h5 class="card-title">Production Currencies</h5>
|
|
<p class="card-subtitle text-muted">
|
|
Production currencies are always available based on SilverPay support.
|
|
</p>
|
|
</div>
|
|
<div class="card-body">
|
|
<div class="alert alert-info">
|
|
<h6>Always Enabled:</h6>
|
|
<ul class="mb-0">
|
|
<li><strong>BTC</strong> - Bitcoin (Production)</li>
|
|
<li><strong>ETH</strong> - Ethereum (Production)</li>
|
|
</ul>
|
|
<p class="mt-2 mb-0">
|
|
<small>These currencies are automatically available in the TeleBot based on SilverPay API support.</small>
|
|
</p>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
|
|
<div class="row mt-4">
|
|
<div class="col-12">
|
|
<div class="card">
|
|
<div class="card-header">
|
|
<h5 class="card-title">SilverPay Integration Settings</h5>
|
|
<p class="card-subtitle text-muted">
|
|
Configure SilverPay payment gateway integration for cryptocurrency payments.
|
|
</p>
|
|
</div>
|
|
<div class="card-body">
|
|
<form asp-controller="SystemSettings" asp-action="UpdateSilverPaySettings" method="post">
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<div class="mb-3">
|
|
<label for="silverPayBaseUrl" class="form-label">
|
|
<strong>Base URL</strong>
|
|
<small class="text-muted d-block">SilverPay API endpoint URL</small>
|
|
</label>
|
|
<input type="url"
|
|
class="form-control"
|
|
id="silverPayBaseUrl"
|
|
name="BaseUrl"
|
|
value="@Model.SilverPaySettings.BaseUrl"
|
|
placeholder="http://31.97.57.205:8001"
|
|
required>
|
|
<small class="form-text text-muted">
|
|
Example: http://31.97.57.205:8001 or https://api.silverpay.com
|
|
</small>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<div class="mb-3">
|
|
<label for="silverPayApiKey" class="form-label">
|
|
<strong>API Key</strong>
|
|
<small class="text-muted d-block">Authentication key for SilverPay API</small>
|
|
</label>
|
|
<div class="input-group">
|
|
<input type="password"
|
|
class="form-control"
|
|
id="silverPayApiKey"
|
|
name="ApiKey"
|
|
value="@Model.SilverPaySettings.ApiKey"
|
|
placeholder="Enter API key">
|
|
<button class="btn btn-outline-secondary" type="button" onclick="togglePasswordVisibility('silverPayApiKey')">
|
|
<i class="fas fa-eye"></i>
|
|
</button>
|
|
</div>
|
|
<small class="form-text text-muted">
|
|
Leave empty if SilverPay doesn't require authentication
|
|
</small>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<div class="mb-3">
|
|
<label for="silverPayWebhookSecret" class="form-label">
|
|
<strong>Webhook Secret</strong>
|
|
<small class="text-muted d-block">Secret key for webhook validation</small>
|
|
</label>
|
|
<div class="input-group">
|
|
<input type="password"
|
|
class="form-control"
|
|
id="silverPayWebhookSecret"
|
|
name="WebhookSecret"
|
|
value="@Model.SilverPaySettings.WebhookSecret"
|
|
placeholder="Enter webhook secret">
|
|
<button class="btn btn-outline-secondary" type="button" onclick="togglePasswordVisibility('silverPayWebhookSecret')">
|
|
<i class="fas fa-eye"></i>
|
|
</button>
|
|
</div>
|
|
<small class="form-text text-muted">
|
|
Used to validate incoming webhook requests from SilverPay
|
|
</small>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<div class="mb-3">
|
|
<label for="silverPayWebhookUrl" class="form-label">
|
|
<strong>Default Webhook URL</strong>
|
|
<small class="text-muted d-block">Your endpoint for receiving payment notifications</small>
|
|
</label>
|
|
<input type="url"
|
|
class="form-control"
|
|
id="silverPayWebhookUrl"
|
|
name="DefaultWebhookUrl"
|
|
value="@Model.SilverPaySettings.DefaultWebhookUrl"
|
|
placeholder="https://yourdomain.com/api/silverpay/webhook">
|
|
<small class="form-text text-muted">
|
|
Example: https://yourdomain.com/api/silverpay/webhook
|
|
</small>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="row">
|
|
<div class="col-md-6">
|
|
<div class="mb-3">
|
|
<label class="form-label">
|
|
<strong>Connection Status</strong>
|
|
</label>
|
|
<div class="form-control-plaintext">
|
|
@if (Model.SilverPaySettings.IsConfigured)
|
|
{
|
|
<span class="badge bg-success">
|
|
<i class="fas fa-check-circle"></i> Configured
|
|
</span>
|
|
@if (Model.SilverPaySettings.LastTestSuccess)
|
|
{
|
|
<span class="badge bg-success ms-2">
|
|
<i class="fas fa-plug"></i> Connected
|
|
</span>
|
|
}
|
|
else
|
|
{
|
|
<span class="badge bg-warning ms-2">
|
|
<i class="fas fa-exclamation-triangle"></i> Not Tested
|
|
</span>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
<span class="badge bg-secondary">
|
|
<i class="fas fa-times-circle"></i> Not Configured
|
|
</span>
|
|
}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="col-md-6">
|
|
<div class="mb-3">
|
|
<label class="form-label">
|
|
<strong>Last Test</strong>
|
|
</label>
|
|
<div class="form-control-plaintext">
|
|
@if (Model.SilverPaySettings.LastTestDate.HasValue)
|
|
{
|
|
<span>@Model.SilverPaySettings.LastTestDate.Value.ToString("yyyy-MM-dd HH:mm:ss")</span>
|
|
@if (!string.IsNullOrEmpty(Model.SilverPaySettings.LastTestMessage))
|
|
{
|
|
<small class="text-muted d-block">@Model.SilverPaySettings.LastTestMessage</small>
|
|
}
|
|
}
|
|
else
|
|
{
|
|
<span class="text-muted">Never tested</span>
|
|
}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="mt-3">
|
|
<button type="submit" class="btn btn-primary">
|
|
<i class="fas fa-save"></i> Save SilverPay Settings
|
|
</button>
|
|
<button type="submit" formaction="/Admin/SystemSettings/TestSilverPayConnection" class="btn btn-secondary ms-2">
|
|
<i class="fas fa-plug"></i> Test Connection
|
|
</button>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
@section Scripts {
|
|
<script>
|
|
function togglePasswordVisibility(inputId) {
|
|
var input = document.getElementById(inputId);
|
|
if (input.type === "password") {
|
|
input.type = "text";
|
|
} else {
|
|
input.type = "password";
|
|
}
|
|
}
|
|
</script>
|
|
} |