feat: Add Stripe payment integration and subscription management
- Add Stripe.net SDK for payment processing - Implement StripeService with checkout sessions, customer portal, webhooks - Implement SubscriptionService for quota management - Add quota enforcement to CVCheckService - Create Pricing, Billing, Settings pages - Add checkout success/cancel pages - Update Check and Dashboard with usage indicators - Add ResetMonthlyUsageJob for billing cycle resets - Add database migration for subscription fields Plan tiers: Free (3 checks), Professional £49/mo (30), Enterprise £199/mo (unlimited) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -24,6 +24,7 @@ public sealed class CVCheckServiceTests : IDisposable
|
||||
private readonly Mock<IFileStorageService> _fileStorageServiceMock;
|
||||
private readonly Mock<IBackgroundJobClient> _backgroundJobClientMock;
|
||||
private readonly Mock<IAuditService> _auditServiceMock;
|
||||
private readonly Mock<ISubscriptionService> _subscriptionServiceMock;
|
||||
private readonly Mock<ILogger<CVCheckService>> _loggerMock;
|
||||
private readonly CVCheckService _sut;
|
||||
|
||||
@@ -37,13 +38,19 @@ public sealed class CVCheckServiceTests : IDisposable
|
||||
_fileStorageServiceMock = new Mock<IFileStorageService>();
|
||||
_backgroundJobClientMock = new Mock<IBackgroundJobClient>();
|
||||
_auditServiceMock = new Mock<IAuditService>();
|
||||
_subscriptionServiceMock = new Mock<ISubscriptionService>();
|
||||
_loggerMock = new Mock<ILogger<CVCheckService>>();
|
||||
|
||||
// Setup subscription service to allow checks by default
|
||||
_subscriptionServiceMock.Setup(x => x.CanPerformCheckAsync(It.IsAny<Guid>()))
|
||||
.ReturnsAsync(true);
|
||||
|
||||
_sut = new CVCheckService(
|
||||
_dbContext,
|
||||
_fileStorageServiceMock.Object,
|
||||
_backgroundJobClientMock.Object,
|
||||
_auditServiceMock.Object,
|
||||
_subscriptionServiceMock.Object,
|
||||
_loggerMock.Object);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user