2025-08-07 16:41:39 +02:00
|
|
|
//go:build !nopayments
|
|
|
|
|
|
|
|
|
|
package payments
|
|
|
|
|
|
|
|
|
|
import "github.com/stripe/stripe-go/v74"
|
|
|
|
|
|
2025-08-07 17:24:57 +02:00
|
|
|
// Available is a constant used to indicate that Stripe support is available.
|
|
|
|
|
// It can be disabled with the 'nopayments' build tag.
|
2025-08-07 16:41:39 +02:00
|
|
|
const Available = true
|
|
|
|
|
|
2025-08-07 17:24:57 +02:00
|
|
|
// SubscriptionStatus is an alias for stripe.SubscriptionStatus
|
2025-08-07 16:41:39 +02:00
|
|
|
type SubscriptionStatus stripe.SubscriptionStatus
|
|
|
|
|
|
2025-08-07 17:24:57 +02:00
|
|
|
// PriceRecurringInterval is an alias for stripe.PriceRecurringInterval
|
2025-08-07 16:41:39 +02:00
|
|
|
type PriceRecurringInterval stripe.PriceRecurringInterval
|
|
|
|
|
|
2025-08-07 17:24:57 +02:00
|
|
|
// Setup sets the Stripe secret key and disables telemetry
|
2025-08-07 16:41:39 +02:00
|
|
|
func Setup(stripeSecretKey string) {
|
|
|
|
|
stripe.EnableTelemetry = false // Whoa!
|
|
|
|
|
stripe.Key = stripeSecretKey
|
|
|
|
|
}
|