diff --git a/src/Billing/BillingSettings.cs b/src/Billing/BillingSettings.cs index c7948a9a26..d1367e689f 100644 --- a/src/Billing/BillingSettings.cs +++ b/src/Billing/BillingSettings.cs @@ -6,6 +6,7 @@ public virtual string StripeWebhookKey { get; set; } public virtual string StripeWebhookSecret { get; set; } public virtual string BitPayWebhookKey { get; set; } + public virtual string AppleWebhookKey { get; set; } public virtual PayPalSettings PayPal { get; set; } = new PayPalSettings(); public class PayPalSettings diff --git a/src/Billing/Controllers/AppleController.cs b/src/Billing/Controllers/AppleController.cs index b86b81fc6f..43884830e2 100644 --- a/src/Billing/Controllers/AppleController.cs +++ b/src/Billing/Controllers/AppleController.cs @@ -51,7 +51,7 @@ namespace Bit.Billing.Controllers var key = HttpContext.Request.Query.ContainsKey("key") ? HttpContext.Request.Query["key"].ToString() : null; - if(key != _billingSettings.PayPal.WebhookKey) + if(key != _billingSettings.AppleWebhookKey) { return new BadRequestResult(); } diff --git a/src/Billing/appsettings.json b/src/Billing/appsettings.json index 12c20d659f..556b0d4a53 100644 --- a/src/Billing/appsettings.json +++ b/src/Billing/appsettings.json @@ -73,6 +73,7 @@ "stripeWebhookKey": "SECRET", "stripeWebhookSecret": "SECRET", "bitPayWebhookKey": "SECRET", + "appleWebhookKey": "SECRET", "payPal": { "production": false, "businessId": "AD3LAUZSNVPJY",