mirror of
https://github.com/binwiederhier/ntfy.git
synced 2025-11-28 03:12:26 +01:00
Make it easy to build without Stripe
This commit is contained in:
parent
32fa8d43c1
commit
ea338ae4fa
11 changed files with 89 additions and 41 deletions
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
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue