Refactor payment verification to manual workflow and add comprehensive cleanup tools

Major changes:
• Remove BTCPay Server integration in favor of SilverPAY manual verification
• Add test data cleanup mechanisms (API endpoints and shell scripts)
• Fix compilation errors in TestController (IdentityReference vs CustomerIdentity)
• Add deployment automation scripts for Hostinger VPS
• Enhance integration testing with comprehensive E2E validation
• Add Blazor components and mobile-responsive CSS for admin interface
• Create production environment configuration scripts

Key Features Added:
• Manual payment verification through Admin panel Order Details
• Bulk test data cleanup with proper cascade handling
• Deployment automation with systemd service configuration
• Comprehensive E2E testing suite with SilverPAY integration validation
• Mobile-first admin interface improvements

Security & Production:
• Environment variable configuration for production secrets
• Proper JWT and VAPID key management
• SilverPAY API integration with live credentials
• Database cleanup and maintenance tools

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
2025-09-25 19:29:00 +01:00
parent 1588c79df0
commit 127be759c8
46 changed files with 3470 additions and 971 deletions

View File

@@ -230,14 +230,14 @@ else
print_result "SilverPAY Order" "FAIL" "$(echo $SILVERPAY_RESPONSE | head -c 50)"
fi
# Test 5.2: Payment Fallback to BTCPay
echo -n "Testing BTCPay fallback... "
# Test 5.2: Payment Creation via LittleShop (using SilverPAY)
echo -n "Testing payment creation via LittleShop... "
if [ ! -z "$ORDER_ID" ]; then
PAYMENT_RESPONSE=$(auth_request "POST" "/api/orders/$ORDER_ID/payments" '{"currency":"BTC"}')
if echo "$PAYMENT_RESPONSE" | grep -q "walletAddress"; then
print_result "Payment Creation" "PASS" "Fallback working"
if echo "$PAYMENT_RESPONSE" | grep -q "walletAddress\|paymentAddress\|address"; then
print_result "Payment Creation" "PASS" "SilverPAY integration working"
else
print_result "Payment Creation" "FAIL" "No wallet address"
print_result "Payment Creation" "FAIL" "No payment address returned"
fi
else
print_result "Payment Creation" "SKIP" "No order created"
@@ -326,16 +326,19 @@ else
print_result "SilverPAY Webhook" "FAIL" "Webhook failed"
fi
# Test 8.2: BTCPay Webhook
echo -n "Testing BTCPay webhook... "
RESPONSE=$(curl -s -o /dev/null -w "%{http_code}" -X POST "$LITTLESHOP_URL/api/orders/payments/webhook" \
-H "Content-Type: application/json" \
-d '{"invoiceId":"test-invoice","status":"complete"}')
if [ "$RESPONSE" = "200" ] || [ "$RESPONSE" = "400" ]; then
print_result "BTCPay Webhook" "PASS" ""
# Test 8.2: SilverPAY Status Check (replacing BTCPay webhook test)
echo -n "Testing SilverPAY order status check... "
# Test if we can check order status via SilverPAY
if [ ! -z "$SILVERPAY_ORDER_ID" ]; then
STATUS_RESPONSE=$(curl -s -X GET "$SILVERPAY_URL/api/v1/orders/$SILVERPAY_ORDER_ID" \
-H "X-API-Key: test-api-key")
if echo "$STATUS_RESPONSE" | grep -q "id"; then
print_result "SilverPAY Status Check" "PASS" ""
else
print_result "SilverPAY Status Check" "FAIL" "Could not get order status"
fi
else
print_result "BTCPay Webhook" "FAIL" "HTTP $RESPONSE"
print_result "SilverPAY Status Check" "SKIP" "No SilverPAY order created"
fi
echo ""