Fix: Update interface to match confirmations parameter

- Added confirmations parameter to ICryptoPaymentService.ProcessPaymentWebhookAsync
- Updated CryptoPaymentService implementation to pass confirmations parameter
- Fixes build error: interface member signature mismatch

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
SysAdmin 2025-10-06 16:35:09 +01:00
parent 110ad5f956
commit cede0e7c47
2 changed files with 3 additions and 3 deletions

View File

@ -174,10 +174,10 @@ public class CryptoPaymentService : ICryptoPaymentService
} }
// Remove old BTCPay webhook processor // Remove old BTCPay webhook processor
public async Task<bool> ProcessPaymentWebhookAsync(string invoiceId, PaymentStatus status, decimal amount, string? transactionHash = null) public async Task<bool> ProcessPaymentWebhookAsync(string invoiceId, PaymentStatus status, decimal amount, string? transactionHash = null, int confirmations = 0)
{ {
// This method is kept for interface compatibility but redirects to SilverPAY // This method is kept for interface compatibility but redirects to SilverPAY
return await ProcessSilverPayWebhookAsync(invoiceId, status, amount, transactionHash); return await ProcessSilverPayWebhookAsync(invoiceId, status, amount, transactionHash, confirmations);
} }
private static CryptoPaymentDto MapToDto(CryptoPayment payment) private static CryptoPaymentDto MapToDto(CryptoPayment payment)

View File

@ -7,7 +7,7 @@ public interface ICryptoPaymentService
{ {
Task<CryptoPaymentDto> CreatePaymentAsync(Guid orderId, CryptoCurrency currency); Task<CryptoPaymentDto> CreatePaymentAsync(Guid orderId, CryptoCurrency currency);
Task<IEnumerable<CryptoPaymentDto>> GetPaymentsByOrderAsync(Guid orderId); Task<IEnumerable<CryptoPaymentDto>> GetPaymentsByOrderAsync(Guid orderId);
Task<bool> ProcessPaymentWebhookAsync(string invoiceId, PaymentStatus status, decimal amount, string? transactionHash = null); Task<bool> ProcessPaymentWebhookAsync(string invoiceId, PaymentStatus status, decimal amount, string? transactionHash = null, int confirmations = 0);
Task<bool> ProcessSilverPayWebhookAsync(string orderId, PaymentStatus status, decimal amount, string? transactionHash = null, int confirmations = 0); Task<bool> ProcessSilverPayWebhookAsync(string orderId, PaymentStatus status, decimal amount, string? transactionHash = null, int confirmations = 0);
Task<PaymentStatusDto> GetPaymentStatusAsync(Guid paymentId); Task<PaymentStatusDto> GetPaymentStatusAsync(Guid paymentId);
} }