Skip to content

Commit

Permalink
Merge pull request #471 from stripe/ob-failure-reason
Browse files Browse the repository at this point in the history
Support for redirect.failure_reason attribute
  • Loading branch information
brandur-stripe authored Oct 5, 2017
2 parents efba974 + 9952486 commit c05568f
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions source.go
Original file line number Diff line number Diff line change
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 (
RedirectFlowFailureReasonDeclined RedirectFlowFailureReason = "declined"
RedirectFlowFailureReasonProcessingError RedirectFlowFailureReason = "processing_error"
RedirectFlowFailureReasonUserAbort RedirectFlowFailureReason = "user_abort"
)

// 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 c05568f

Please sign in to comment.