Skip to content

Commit

Permalink
Merge pull request #1042 from stripe/remi-issuing-3ds
Browse files Browse the repository at this point in the history
Add support for `ThreeDSecure` on Issuing `Authorization`
  • Loading branch information
remi-stripe authored Mar 12, 2020
2 parents 40d9a01 + 9712af2 commit 5f9e20f
Showing 1 changed file with 24 additions and 5 deletions.
29 changes: 24 additions & 5 deletions issuing_authorization.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,16 @@ const (
IssuingAuthorizationVerificationDataCheckNotProvided IssuingAuthorizationVerificationDataCheck = "not_provided"
)

// IssuingAuthorizationVerificationDataThreeDSecureResult is the list of possible values for result of 3DS.
type IssuingAuthorizationVerificationDataThreeDSecureResult string

// List of values that IssuingAuthorizationVerificationDataThreeDSecureResult can take.
const (
IssuingAuthorizationVerificationDataThreeDSecureResultAttemptAcknowledged IssuingAuthorizationVerificationDataThreeDSecureResult = "attempt_acknowledged"
IssuingAuthorizationVerificationDataThreeDSecureResultAuthenticated IssuingAuthorizationVerificationDataThreeDSecureResult = "authenticated"
IssuingAuthorizationVerificationDataThreeDSecureResultFailed IssuingAuthorizationVerificationDataThreeDSecureResult = "failed"
)

// IssuingAuthorizationWalletProviderType is the list of possible values for the authorization's wallet provider.
type IssuingAuthorizationWalletProviderType string

Expand Down Expand Up @@ -150,13 +160,22 @@ type IssuingAuthorizationRequestHistory struct {
ViolatedAuthorizationControls []*IssuingAuthorizationRequestHistoryViolatedAuthorizationControl `json:"violated_authorization_controls"`
}

// IssuingAuthorizationVerificationDataThreeDSecure is the resource representing 3DS results.
type IssuingAuthorizationVerificationDataThreeDSecure struct {
Result IssuingAuthorizationVerificationDataThreeDSecureResult `json:"result"`
}

// IssuingAuthorizationVerificationData is the resource representing verification data on an issuing authorization.
type IssuingAuthorizationVerificationData struct {
AddressLine1Check IssuingAuthorizationVerificationDataCheck `json:"address_line1_check"`
AddressZipCheck IssuingAuthorizationVerificationDataCheck `json:"address_zip_check"`
Authentication IssuingAuthorizationVerificationDataAuthentication `json:"authentication"`
CVCCheck IssuingAuthorizationVerificationDataCheck `json:"cvc_check"`
ExpiryCheck IssuingAuthorizationVerificationDataCheck `json:"expiry_check"`
AddressLine1Check IssuingAuthorizationVerificationDataCheck `json:"address_line1_check"`
AddressZipCheck IssuingAuthorizationVerificationDataCheck `json:"address_zip_check"`
CVCCheck IssuingAuthorizationVerificationDataCheck `json:"cvc_check"`
ExpiryCheck IssuingAuthorizationVerificationDataCheck `json:"expiry_check"`
ThreeDSecure *IssuingAuthorizationVerificationDataThreeDSecure `json:"three_d_secure"`

// This property is considered deprecated. Use ThreeDSecure instead.
// TODO remove in the next major version
Authentication IssuingAuthorizationVerificationDataAuthentication `json:"authentication"`
}

// IssuingAuthorization is the resource representing a Stripe issuing authorization.
Expand Down

0 comments on commit 5f9e20f

Please sign in to comment.