Add Stripe patronage checkout integration
This commit is contained in:
parent
ba01b78d68
commit
861dff3ed7
13 changed files with 812 additions and 32 deletions
28
src/Bifrost.Web/Configuration/StripeOptions.cs
Normal file
28
src/Bifrost.Web/Configuration/StripeOptions.cs
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
namespace Bifrost.Web.Configuration;
|
||||
|
||||
public sealed class StripeOptions
|
||||
{
|
||||
public const string SectionName = "Stripe";
|
||||
|
||||
public bool EnableCheckout { get; set; }
|
||||
|
||||
public string SecretKey { get; set; } = string.Empty;
|
||||
|
||||
public string WebhookSecret { get; set; } = string.Empty;
|
||||
|
||||
public string GeneralPatronageGitHubLogin { get; set; } = string.Empty;
|
||||
|
||||
public string SuccessUrl { get; set; } = "https://velvet.gamecult.org/?patronage=success";
|
||||
|
||||
public string CancelUrl { get; set; } = "https://velvet.gamecult.org/?patronage=cancelled";
|
||||
|
||||
public bool IsCheckoutConfigured =>
|
||||
EnableCheckout &&
|
||||
!string.IsNullOrWhiteSpace(SecretKey) &&
|
||||
!string.IsNullOrWhiteSpace(SuccessUrl) &&
|
||||
!string.IsNullOrWhiteSpace(CancelUrl);
|
||||
|
||||
public bool IsWebhookConfigured =>
|
||||
EnableCheckout &&
|
||||
!string.IsNullOrWhiteSpace(WebhookSecret);
|
||||
}
|
||||
Loading…
Reference in a new issue