payments.go 656 B

123456789101112131415161718192021
  1. //go:build !nopayments
  2. package payments
  3. import "github.com/stripe/stripe-go/v74"
  4. // Available is a constant used to indicate that Stripe support is available.
  5. // It can be disabled with the 'nopayments' build tag.
  6. const Available = true
  7. // SubscriptionStatus is an alias for stripe.SubscriptionStatus
  8. type SubscriptionStatus stripe.SubscriptionStatus
  9. // PriceRecurringInterval is an alias for stripe.PriceRecurringInterval
  10. type PriceRecurringInterval stripe.PriceRecurringInterval
  11. // Setup sets the Stripe secret key and disables telemetry
  12. func Setup(stripeSecretKey string) {
  13. stripe.EnableTelemetry = false // Whoa!
  14. stripe.Key = stripeSecretKey
  15. }