Skip to content

Commit

Permalink
Add missing 3D Secure fields for Payments
Browse files Browse the repository at this point in the history
  • Loading branch information
gomezjdaniel authored and a-ibarra committed Jun 2, 2022
1 parent 65b5e1a commit 0ee3a41
Showing 1 changed file with 48 additions and 6 deletions.
54 changes: 48 additions & 6 deletions payments/threeDS.go
Original file line number Diff line number Diff line change
@@ -1,13 +1,55 @@
package payments

type Exemption string

const (
// LowValue ...
LowValue Exemption = "low_value"
// SecureCorporatePayment ...
SecureCorporatePayment Exemption = "secure_corporate_payment"
// TrustedListing ...
TrustedListing Exemption = "trusted_listing"
// TransactionRiskAssessment ...
TransactionRiskAssessment Exemption = "transaction_risk_assessment"
// ThreeDSOutage ...
ThreeDSOutage Exemption = "3ds_outage"
// SCADelegation ...
SCADelegation Exemption = "sca_delegation"
// OutOfSCAScope ...
OutOfSCAScope Exemption = "out_of_sca_scope"
// Other ...
Other Exemption = "other"
// LowRiskProgram ...
LowRiskProgram Exemption = "low_risk_program"
)

type ChallengeIndicator string

const (
// NoPreference ...
NoPreference ChallengeIndicator = "no_preference"
// NoChallengeRequested ...
NoChallengeRequested ChallengeIndicator = "no_challenge_requested"
// ChallengeRequested ...
ChallengeRequested ChallengeIndicator = "challenge_requested"
// ChallengeRequestedMandate ...
ChallengeRequestedMandate ChallengeIndicator = "challenge_requested_mandate"
)

func (c ChallengeIndicator) String() string {
return string(c)
}

// ThreeDS ...
type ThreeDS struct {
Enabled *bool `json:"enabled,omitempty"`
AttemptN3d *bool `json:"attempt_n3d,omitempty"`
ECI string `json:"eci,omitempty"`
Cryptogram string `json:"cryptogram,omitempty"`
XID string `json:"xid,omitempty"`
Version string `json:"version,omitempty"`
Enabled *bool `json:"enabled,omitempty"`
AttemptN3d *bool `json:"attempt_n3d,omitempty"`
ECI string `json:"eci,omitempty"`
Cryptogram string `json:"cryptogram,omitempty"`
XID string `json:"xid,omitempty"`
Version string `json:"version,omitempty"`
Exemption Exemption `json:"exemption,omitempty"`
ChallengeIndicator ChallengeIndicator `json:"challenge_indicator,omitempty"`
}

// ThreeDSEnrollment : 3D-Secure Enrollment Data
Expand Down

0 comments on commit 0ee3a41

Please sign in to comment.