Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type SetupIntent ¶
type SetupIntent struct {
mixin.Model[SetupIntent]
CustomerId string `json:"customerId,omitempty"`
PaymentMethodId string `json:"paymentMethodId,omitempty"`
Status Status `json:"status"`
Usage string `json:"usage,omitempty"`
ProviderRef string `json:"providerRef"`
ProviderType string `json:"providerType"`
CanceledAt time.Time `json:"canceledAt,omitempty"`
CancellationReason string `json:"cancellationReason,omitempty"`
LastError string `json:"lastError,omitempty"`
ClientSecret string `json:"clientSecret,omitempty"`
Metadata map[string]interface{} `json:"metadata,omitempty"`
}
SetupIntent represents a flow to save a payment method for future use.
func New ¶
func New(db *datastore.Datastore) *SetupIntent
New creates a new SetupIntent wired to the given datastore.
func (*SetupIntent) Cancel ¶
func (si *SetupIntent) Cancel(reason string) error
Cancel transitions the setup intent to Canceled.
func (*SetupIntent) Confirm ¶
func (si *SetupIntent) Confirm() error
Confirm transitions the setup intent to Processing.
func (*SetupIntent) MarkSucceeded ¶
func (si *SetupIntent) MarkSucceeded(providerRef string)
MarkSucceeded marks the setup intent as succeeded.
Click to show internal directories.
Click to hide internal directories.