Skip to content

Commit

Permalink
Support for redirect.failure_reason attribute
Browse files Browse the repository at this point in the history
  • Loading branch information
ob-stripe committed Oct 5, 2017
1 parent efba974 commit e4d2955
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions source.go
Expand Up @@ -100,6 +100,15 @@ type SourceOwner struct {
VerifiedPhone string `json:"verified_phone"`
}

// RedirectFlowFailureReason represents the possible failure reasons of a redirect flow.
type RedirectFlowFailureReason string

const (
RedirectFlowFailureReasonUserAbort RedirectFlowFailureReason = "user_abort"
RedirectFlowFailureReasonDeclined RedirectFlowFailureReason = "declined"
RedirectFlowFailureReasonProcessingError RedirectFlowFailureReason = "processing_error"
)

// RedirectFlowStatus represents the possible statuses of a redirect flow.
type RedirectFlowStatus string

Expand All @@ -111,9 +120,10 @@ const (

// ReceiverFlow informs of the state of a redirect authentication flow.
type RedirectFlow struct {
ReturnURL string `json:"return_url"`
Status RedirectFlowStatus `json:"status"`
URL string `json:"url"`
FailureReason RedirectFlowFailureReason `json:"failure_reason"`
ReturnURL string `json:"return_url"`
Status RedirectFlowStatus `json:"status"`
URL string `json:"url"`
}

// RefundAttributesStatus are the possible status of a receiver's refund
Expand Down

0 comments on commit e4d2955

Please sign in to comment.