1
0
mirror of https://github.com/bitwarden/server.git synced 2025-03-01 04:01:11 +01:00

paypal webhook key

This commit is contained in:
Kyle Spearrin 2019-02-08 14:28:36 -05:00
parent 1dc22f61d1
commit f837c1708e
3 changed files with 8 additions and 1 deletions

View File

@ -14,6 +14,7 @@
public virtual string ClientId { get; set; }
public virtual string ClientSecret { get; set; }
public virtual string WebhookId { get; set; }
public virtual string WebhookKey { get; set; }
}
}
}

View File

@ -31,6 +31,11 @@ namespace Bit.Billing.Controllers
[HttpPost("webhook")]
public async Task<IActionResult> PostWebhook([FromQuery] string key)
{
if(key != _billingSettings.PayPal.WebhookKey)
{
return new BadRequestResult();
}
if(HttpContext?.Request == null)
{
return new BadRequestResult();

View File

@ -62,7 +62,8 @@
"production": false,
"clientId": "SECRET",
"clientSecret": "SECRET",
"webhookId": "SECRET"
"webhookId": "SECRET",
"webhookKey": "SECRET"
}
}
}