CheckoutOptions
CheckoutOptions describes the contribution to suggest.
CheckoutOptions describes the contribution to suggest. All fields are optional.
type CheckoutOptions struct {
Provider Provider
Amount int64
Currency string
Frequency Frequency
Timeout time.Duration
PollInterval time.Duration
SignInMethod SignInMethod
}Fields#
Provider#
Provider ProviderProvider preselects "github" or "open-collective"; the page never silently switches to another provider.
Amount#
Amount int64Amount in minor units (cents). Zero means unset; a negative amount is invalid.
Currency#
Currency stringCurrency is an ISO 4217 code. GitHub is always USD.
Frequency#
Frequency FrequencyFrequency is OneTime, Monthly or Yearly.
Timeout#
Timeout time.DurationTimeout bounds how long OpenCheckout polls for a new contribution. It covers only the polling phase: a sign-in that OpenCheckout needs first is bounded by Options.SignInTimeout. Defaults to 10 minutes. Ignored by CheckoutURL.
PollInterval#
PollInterval time.DurationPollInterval overrides Options.CheckoutPollInterval for this call.
SignInMethod#
SignInMethod SignInMethodSignInMethod overrides Options.SignInMethod when OpenCheckout has to sign the user in first.