{ { "app_user_id", user.Id } }
};
- var customerService = new CustomerService();
var customer = await customerService.CreateAsync(customerOptions);
customerId = customer.Id;
await _userService.UpdateUserStripeCustomerIdAsync(userId, customerId);
+ _logger.LogInformation($"Created new Stripe customer {customerId} for user {userId}");
}
var options = new SessionCreateOptions
diff --git a/Views/Shared/_AdSpace.cshtml b/Views/Shared/_AdSpace.cshtml
index d27bd46..3d9812a 100644
--- a/Views/Shared/_AdSpace.cshtml
+++ b/Views/Shared/_AdSpace.cshtml
@@ -145,15 +145,9 @@
else if (User.Identity.IsAuthenticated)
{
var isPremium = await AdService.HasValidPremiumSubscription(userId);
- if (isPremium)
- {
-
-
- @Localizer["PremiumUserNoAds"]
-
- }
- else
+ if (!isPremium)
{
+ @* Only show upgrade notice for non-premium users *@
@Localizer["UpgradePremiumRemoveAds"]
@@ -162,4 +156,5 @@ else if (User.Identity.IsAuthenticated)
}
+ @* Premium users: render nothing (100% invisible) *@
}
diff --git a/appsettings.Development.json b/appsettings.Development.json
index e667b05..290425f 100644
--- a/appsettings.Development.json
+++ b/appsettings.Development.json
@@ -38,6 +38,24 @@
"GrowthRateWarningMBPerHour": 200,
"IncludeCollectionStats": true
},
+ "Stripe": {
+ "PublishableKey": "pk_test_51Rs42SB6bFjHQirAJ6kzbFCbBuAobyNbmlgpULFsInl8KRzlpclUoqOZICqvp2S51kquw3Bc04CPO9bNUEgDLDgd00XbAHT7Fh",
+ "SecretKey": "sk_test_51Rs42SB6bFjHQirANOUg8jgzPALbNdVWULSVRMycFRBTzE0QUGA6pkpoQaTVsCIoV3XGRgoJ7E3CA6Y67vWlM76q00QBoKW0aH",
+ "WebhookSecret": "whsec_667402ff1d753b181f626636d556975f2749b5fec4d1231d44f040b057fb3009",
+ "ProductId": "prod_TGTbombliOUYmQ",
+ "Plans": {
+ "Monthly": {
+ "BR": "price_1SJwebB6bFjHQirAloEqXWd6",
+ "PY": "price_1SK4Y0B6bFjHQirAaxNHxILi",
+ "US": "price_XXXXX_monthly_us"
+ },
+ "Yearly": {
+ "BR": "price_1SK4X7B6bFjHQirAdMtviPw4",
+ "PY": "price_1SK4Y0B6bFjHQirAaxNHxILi",
+ "US": "price_XXXXX_yearly_us"
+ }
+ }
+ },
"HealthChecks": {
"MongoDB": {
"TimeoutSeconds": 10,
diff --git a/appsettings.json b/appsettings.json
index 4656ddd..08b245d 100644
--- a/appsettings.json
+++ b/appsettings.json
@@ -21,22 +21,9 @@
}
},
"Stripe": {
- "PublishableKey": "pk_test_51Rs42tBeR5IFYUsBooapyDwQTgh6CFuKbya5R3MVDTrdOUKmgiHQYipU0pgOdG5iKogH77RUYIKBJzbCt5BghUOY00xitV5KiN",
- "SecretKey": "sk_test_51Rs42tBeR5IFYUsBtycRlJJcdwgoMbh8MfQIKIGelBPTQFwDcOn2iCCbw5uG6hnqlpgNAUuFgWRAUUMA8qkABKun00EIx4odDF",
- "WebhookSecret": "whsec_2e828803ceb48e7865458b0cf332b68535fdff8753d26d69b1c88ea55cb0e482",
- "ProductId": "prod_SnfQTxwE3i8r5L",
- "Plans": {
- "Monthly": {
- "BR": "price_1Rs45OBeR5IFYUsBfsnOpOiv",
- "PY": "price_XXXXX_monthly_py",
- "US": "price_XXXXX_monthly_us"
- },
- "Yearly": {
- "BR": "price_1Rs4AyBeR5IFYUsB8kRSNUIM",
- "PY": "price_XXXXX_yearly_py",
- "US": "price_XXXXX_yearly_us"
- }
- }
+ "PublishableKey": "pk_test_51Rs42SB6bFjHQirAJ6kzbFCbBuAobyNbmlgpULFsInl8KRzlpclUoqOZICqvp2S51kquw3Bc04CPO9bNUEgDLDgd00XbAHT7Fh",
+ "SecretKey": "sk_test_51Rs42SB6bFjHQirANOUg8jgzPALbNdVWULSVRMycFRBTzE0QUGA6pkpoQaTVsCIoV3XGRgoJ7E3CA6Y67vWlM76q00QBoKW0aH",
+ "WebhookSecret": "whsec_667402ff1d753b181f626636d556975f2749b5fec4d1231d44f040b057fb3009"
},
"AdSense": {
"ClientId": "ca-pub-3475956393038764",