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:
parent
1dc22f61d1
commit
f837c1708e
@ -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; }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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();
|
||||
|
@ -62,7 +62,8 @@
|
||||
"production": false,
|
||||
"clientId": "SECRET",
|
||||
"clientSecret": "SECRET",
|
||||
"webhookId": "SECRET"
|
||||
"webhookId": "SECRET",
|
||||
"webhookKey": "SECRET"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user