mirror of
https://github.com/binwiederhier/ntfy.git
synced 2026-01-18 16:17:26 +01:00
Make it easy to build without Stripe
This commit is contained in:
16
payments/payments.go
Normal file
16
payments/payments.go
Normal file
@@ -0,0 +1,16 @@
|
||||
//go:build !nopayments
|
||||
|
||||
package payments
|
||||
|
||||
import "github.com/stripe/stripe-go/v74"
|
||||
|
||||
const Available = true
|
||||
|
||||
type SubscriptionStatus stripe.SubscriptionStatus
|
||||
|
||||
type PriceRecurringInterval stripe.PriceRecurringInterval
|
||||
|
||||
func Setup(stripeSecretKey string) {
|
||||
stripe.EnableTelemetry = false // Whoa!
|
||||
stripe.Key = stripeSecretKey
|
||||
}
|
||||
13
payments/payments_dummy.go
Normal file
13
payments/payments_dummy.go
Normal file
@@ -0,0 +1,13 @@
|
||||
//go:build nopayments
|
||||
|
||||
package payments
|
||||
|
||||
const Available = false
|
||||
|
||||
type SubscriptionStatus string
|
||||
|
||||
type PriceRecurringInterval string
|
||||
|
||||
func Setup(stripeSecretKey string) {
|
||||
// Nothing to see here
|
||||
}
|
||||
Reference in New Issue
Block a user