Documentation
¶
Index ¶
- Constants
- Variables
- type Address
- type AddressType
- type Assessment
- type AutoRefreshTokenProvider
- type CardInfo
- type Client
- func (c *Client) GetSignupAssessment(signupID string) (ret *SignupAssessment, err error)
- func (c *Client) RegisterFeedback(feedbackEvent FeedbackType, occurredAt *time.Time, ...) (err error)
- func (c *Client) RegisterFeedbackWithExpiration(feedbackEvent FeedbackType, occurredAt *time.Time, expiresAt *time.Time, ...) (err error)
- func (c *Client) RegisterLogin(login *Login) (ret *TransactionAssessment, err error)
- func (c *Client) RegisterPayment(payment *Payment) (ret *TransactionAssessment, err error)
- func (c *Client) RegisterSignup(installationID string, address *Address) (ret *SignupAssessment, err error)
- func (c *Client) RegisterSignupWithParams(params *Signup) (ret *SignupAssessment, err error)
- type Coordinates
- type CouponType
- type Evidence
- type FeedbackIdentifiers
- type FeedbackType
- type IncogniaClientConfig
- type Login
- type ManualRefreshTokenProvider
- type Payment
- type PaymentMethod
- type PaymentValue
- type Reason
- type Region
- type Signup
- type SignupAssessment
- type StructuredAddress
- type Token
- type TokenClient
- type TokenClientConfig
- type TokenProvider
- type TransactionAddress
- type TransactionAssessment
Constants ¶
View Source
const ( CreditCard paymentMethodType = "credit_card" DebitCard paymentMethodType = "debit_card" GooglePay paymentMethodType = "google_pay" ApplePay paymentMethodType = "apple_pay" NuPay paymentMethodType = "nu_pay" Pix paymentMethodType = "pix" MealVoucher paymentMethodType = "meal_voucher" AccountBalance paymentMethodType = "account_balance" )
Variables ¶
View Source
var ( ErrMissingPayment = errors.New("missing payment parameters") ErrMissingLogin = errors.New("missing login parameters") ErrMissingSignup = errors.New("missing signup parameters") ErrMissingInstallationID = errors.New("missing installation id") ErrMissingInstallationIDOrSessionToken = errors.New("missing installation id or session token") ErrMissingIdentifier = errors.New("missing installation id, request token or session token") ErrMissingAccountID = errors.New("missing account id") ErrMissingSignupID = errors.New("missing signup id") ErrMissingTimestamp = errors.New("missing timestamp") ErrInvalidFeedbackType = errors.New("invalid feedback type") ErrMissingClientIDOrClientSecret = errors.New("client id and client secret are required") ErrConfigIsNil = errors.New("incognia client config is required") )
View Source
var ( ErrTokenNotFound = errors.New("token not found in memory") ErrTokenExpired = errors.New("incognia token expired") )
View Source
var (
ErrEvidenceNotFound = errors.New("evidence not found")
)
View Source
var (
ErrInvalidCredentials = errors.New("invalid credentials")
)
Functions ¶
This section is empty.
Types ¶
type Address ¶
type Address struct { Coordinates *Coordinates StructuredAddress *StructuredAddress AddressLine string }
type AddressType ¶
type AddressType string
const ( Shipping AddressType = "shipping" Billing AddressType = "billing" Home AddressType = "home" )
type Assessment ¶
type Assessment string
const ( LowRisk Assessment = "low_risk" HighRisk Assessment = "high_risk" UnknownRisk Assessment = "unknown_risk" )
type AutoRefreshTokenProvider ¶ added in v1.7.0
type AutoRefreshTokenProvider struct {
// contains filtered or unexported fields
}
func NewAutoRefreshTokenProvider ¶ added in v1.7.0
func NewAutoRefreshTokenProvider(tokenClient *TokenClient) *AutoRefreshTokenProvider
func (*AutoRefreshTokenProvider) GetToken ¶ added in v1.7.0
func (t *AutoRefreshTokenProvider) GetToken() (Token, error)
type Client ¶
type Client struct { UserAgent string // contains filtered or unexported fields }
func New ¶
func New(config *IncogniaClientConfig) (*Client, error)
func (*Client) GetSignupAssessment ¶
func (c *Client) GetSignupAssessment(signupID string) (ret *SignupAssessment, err error)
func (*Client) RegisterFeedback ¶
func (c *Client) RegisterFeedback(feedbackEvent FeedbackType, occurredAt *time.Time, feedbackIdentifiers *FeedbackIdentifiers) (err error)
func (*Client) RegisterFeedbackWithExpiration ¶ added in v1.12.0
func (c *Client) RegisterFeedbackWithExpiration(feedbackEvent FeedbackType, occurredAt *time.Time, expiresAt *time.Time, feedbackIdentifiers *FeedbackIdentifiers) (err error)
func (*Client) RegisterLogin ¶ added in v1.2.0
func (c *Client) RegisterLogin(login *Login) (ret *TransactionAssessment, err error)
func (*Client) RegisterPayment ¶
func (c *Client) RegisterPayment(payment *Payment) (ret *TransactionAssessment, err error)
func (*Client) RegisterSignup ¶
func (c *Client) RegisterSignup(installationID string, address *Address) (ret *SignupAssessment, err error)
func (*Client) RegisterSignupWithParams ¶ added in v1.10.0
func (c *Client) RegisterSignupWithParams(params *Signup) (ret *SignupAssessment, err error)
type Coordinates ¶
type CouponType ¶ added in v1.16.0
type Evidence ¶ added in v1.3.0
type Evidence map[string]interface{}
func (Evidence) GetEvidence ¶ added in v1.3.0
type FeedbackIdentifiers ¶
type FeedbackType ¶
type FeedbackType string
const ( PaymentAccepted FeedbackType = "payment_accepted" PaymentDeclined FeedbackType = "payment_declined" PaymentDeclinedByRiskAnalysis FeedbackType = "payment_declined_by_risk_analysis" PaymentDeclinedByAcquirer FeedbackType = "payment_declined_by_acquirer" PaymentDeclinedByBusiness FeedbackType = "payment_declined_by_business" PaymentDeclinedByManualReview FeedbackType = "payment_declined_by_manual_review" PaymentAcceptedByThirdParty FeedbackType = "payment_accepted_by_third_party" LoginAccepted FeedbackType = "login_accepted" LoginDeclined FeedbackType = "login_declined" SignupAccepted FeedbackType = "signup_accepted" SignupDeclined FeedbackType = "signup_declined" ChallengePassed FeedbackType = "challenge_passed" ChallengeFailed FeedbackType = "challenge_failed" PasswordChangedSuccessfully FeedbackType = "password_changed_successfully" PasswordChangeFailed FeedbackType = "password_change_failed" Verified FeedbackType = "verified" NotVerified FeedbackType = "not_verified" Chargeback FeedbackType = "chargeback" PromotionAbuse FeedbackType = "promotion_abuse" AccountTakeover FeedbackType = "account_takeover" MposFraud FeedbackType = "mpos_fraud" ChargebackNotification FeedbackType = "chargeback_notification" )
type IncogniaClientConfig ¶
type ManualRefreshTokenProvider ¶ added in v1.7.0
type ManualRefreshTokenProvider struct {
// contains filtered or unexported fields
}
func NewManualRefreshTokenProvider ¶ added in v1.7.0
func NewManualRefreshTokenProvider(tokenClient *TokenClient) *ManualRefreshTokenProvider
func (*ManualRefreshTokenProvider) GetToken ¶ added in v1.7.0
func (t *ManualRefreshTokenProvider) GetToken() (Token, error)
func (*ManualRefreshTokenProvider) Refresh ¶ added in v1.7.0
func (t *ManualRefreshTokenProvider) Refresh() (Token, error)
type Payment ¶
type Payment struct { InstallationID *string SessionToken *string RequestToken string AppVersion string DeviceOs string AccountID string ExternalID string PolicyID string Coupon *CouponType Addresses []*TransactionAddress Value *PaymentValue Methods []*PaymentMethod Eval *bool CustomProperties map[string]interface{} }
type PaymentMethod ¶
type PaymentValue ¶
type SignupAssessment ¶
type StructuredAddress ¶
type StructuredAddress struct { Locale string `json:"locale"` CountryName string `json:"country_name"` CountryCode string `json:"country_code"` State string `json:"state"` City string `json:"city"` Borough string `json:"borough"` Neighborhood string `json:"neighborhood"` Street string `json:"street"` Number string `json:"number"` Complements string `json:"complements"` PostalCode string `json:"postal_code"` }
type TokenClient ¶ added in v1.7.0
type TokenClient struct { ClientID string ClientSecret string UserAgent string // contains filtered or unexported fields }
func NewTokenClient ¶ added in v1.7.0
func NewTokenClient(config *TokenClientConfig) *TokenClient
type TokenClientConfig ¶ added in v1.7.0
type TokenProvider ¶ added in v1.7.0
type TransactionAddress ¶
type TransactionAddress struct { Type AddressType `json:"type"` Coordinates *Coordinates `json:"address_coordinates"` StructuredAddress *StructuredAddress `json:"structured_address"` AddressLine string `json:"address_line"` }
type TransactionAssessment ¶
type TransactionAssessment struct { ID string `json:"id"` RiskAssessment Assessment `json:"risk_assessment"` DeviceID string `json:"device_id"` Evidence Evidence `json:"evidence"` Reasons []Reason `json:"reasons"` }
Click to show internal directories.
Click to hide internal directories.