Documentation
¶
Index ¶
- Constants
- func DefaultLogger() *log.Logger
- type AuthorizationType
- type CheckoutEnv
- func (e *CheckoutEnv) AuthorizationUri() string
- func (e *CheckoutEnv) BalancesUri() string
- func (e *CheckoutEnv) BaseUri() string
- func (e *CheckoutEnv) FilesUri() string
- func (e *CheckoutEnv) ForwardUri() string
- func (e *CheckoutEnv) IdentityUri() string
- func (e *CheckoutEnv) IsSandbox() bool
- func (e *CheckoutEnv) TransfersUri() string
- type Configuration
- type DefaultKeysSdkCredentials
- type Environment
- type EnvironmentSubdomain
- type OAuthAccessToken
- type OAuthSdkCredentials
- type OAuthServiceResponse
- type PlatformType
- type PreviousKeysSdkCredentials
- type SdkAuthorization
- type SdkBuilder
- type SdkCredentials
- type StaticKeys
- type StaticKeysBuilder
- type StdLogger
Constants ¶
View Source
const ( PreviousSecretKeyPattern string = "^sk_(test_)?(\\w{8})-(\\w{4})-(\\w{4})-(\\w{4})-(\\w{12})$" PreviousPublicKeyPattern string = "^pk_(test_)?(\\w{8})-(\\w{4})-(\\w{4})-(\\w{4})-(\\w{12})$" DefaultSecretKeyPattern string = "^sk_(sbox_)?[a-z2-7]{26}[a-z2-7*#$=]$" DefaultPublicKeyPattern string = "^pk_(sbox_)?[a-z2-7]{26}[a-z2-7*#$=]$" )
View Source
const ( Accounts = "accounts" Balances = "balances" BalancesView = "balances:view" Disputes = "disputes" DisputesAccept = "disputes:accept" DisputesProvideEvidence = "disputes:provide-evidence" DisputesSchemeFiles = "disputes:scheme-files" DisputesView = "disputes:view" Files = "files" FilesDownload = "files:download" FilesRetrieve = "files:retrieve" FilesUpload = "files:upload" FinancialActions = "financial-actions" FinancialActionsView = "financial-actions:view" Flow = "flow" FlowEvents = "flow:events" FlowWorkflows = "flow:workflows" Forward = "forward" ForwardSecrets = "forward:secrets" Fx = "fx" Gateway = "gateway" GatewayPayment = "gateway:payment" GatewayPaymentAuthorization = "gateway:payment-authorizations" GatewayPaymentCancellations = "gateway:payment-cancellations" GatewayPaymentCaptures = "gateway:payment-captures" GatewayPaymentDetails = "gateway:payment-details" GatewayPaymentRefunds = "gateway:payment-refunds" GatewayPaymentVoids = "gateway:payment-voids" IdentityVerification = "identity-verification" IssuingCardMgmt = "issuing:card-mgmt" IssuingClient = "issuing:client" IssuingControlsRead = "issuing:controls-read" IssuingControlsWrite = "issuing:controls-write" IssuingDisputesRead = "issuing:disputes-read" IssuingDisputesWrite = "issuing:disputes-write" IssuingTransactionsRead = "issuing:transactions-read" Marketplace = "marketplace" Middleware = "middleware" MiddlewareGateway = "middleware:gateway" MiddlewareMerchantsPublic = "middleware:merchants-public" MiddlewareMerchantsSecret = "middleware:merchants-secret" MiddlewarePaymentContext = "middleware:payment-context" PaymentContexts = "Payment Contexts" PaymentsSearch = "payments:search" PayoutsBankDetails = "payouts:bank-details" Reports = "reports" ReportsView = "reports:view" SessionsApp = "sessions:app" SessionsBrowser = "sessions:browser" Transfers = "transfers" TransfersCreate = "transfers:create" TransfersView = "transfers:view" Vault = "vault" VaultApmeEnrollment = "vault:apme-enrollment" VaultCardMetadata = "vault:card-metadata" VaultCustomers = "vault:customers" VaultInstruments = "vault:instruments" VaultNetworkTokens = "vault:network-tokens" VaultRealTimeAccountUpdater = "vault:real-time-account-updater" VaultTokenization = "vault:tokenization" )
Variables ¶
This section is empty.
Functions ¶
func DefaultLogger ¶
Types ¶
type AuthorizationType ¶
type AuthorizationType string
const ( PublicKey AuthorizationType = "PUBLIC_KEY" SecretKey AuthorizationType = "SECRET_KEY" PublicKeyOrOauth AuthorizationType = "PUBLIC_KEY_OR_OAUTH" SecretKeyOrOauth AuthorizationType = "SECRET_KEY_OR_OAUTH" OAuth AuthorizationType = "OAUTH" CustomAuth AuthorizationType = "CUSTOM" )
type CheckoutEnv ¶
type CheckoutEnv struct {
// contains filtered or unexported fields
}
func NewEnvironment ¶
func Production ¶
func Production() *CheckoutEnv
func Sandbox ¶
func Sandbox() *CheckoutEnv
func (*CheckoutEnv) AuthorizationUri ¶
func (e *CheckoutEnv) AuthorizationUri() string
func (*CheckoutEnv) BalancesUri ¶
func (e *CheckoutEnv) BalancesUri() string
func (*CheckoutEnv) BaseUri ¶
func (e *CheckoutEnv) BaseUri() string
func (*CheckoutEnv) FilesUri ¶
func (e *CheckoutEnv) FilesUri() string
func (*CheckoutEnv) ForwardUri ¶ added in v2.6.0
func (e *CheckoutEnv) ForwardUri() string
func (*CheckoutEnv) IdentityUri ¶ added in v2.6.0
func (e *CheckoutEnv) IdentityUri() string
func (*CheckoutEnv) IsSandbox ¶
func (e *CheckoutEnv) IsSandbox() bool
func (*CheckoutEnv) TransfersUri ¶
func (e *CheckoutEnv) TransfersUri() string
type Configuration ¶
type Configuration struct {
Credentials SdkCredentials
EnableTelemetry bool
Environment Environment
EnvironmentSubdomain *EnvironmentSubdomain
HttpClient http.Client
Logger StdLogger
}
func NewConfiguration ¶
func NewConfiguration( credentials SdkCredentials, enableTelemetry *bool, environment Environment, client *http.Client, logger StdLogger, ) *Configuration
func NewConfigurationWithSubdomain ¶
func NewConfigurationWithSubdomain( credentials SdkCredentials, environment Environment, environmentSubdomain *EnvironmentSubdomain, client *http.Client, logger StdLogger, ) *Configuration
type DefaultKeysSdkCredentials ¶
type DefaultKeysSdkCredentials struct {
StaticKeys
}
func NewDefaultKeysSdkCredentials ¶
func NewDefaultKeysSdkCredentials(secretKey string, publicKey string) *DefaultKeysSdkCredentials
func (*DefaultKeysSdkCredentials) GetAuthorization ¶
func (f *DefaultKeysSdkCredentials) GetAuthorization(authorizationType AuthorizationType) (*SdkAuthorization, error)
type Environment ¶
type EnvironmentSubdomain ¶
func NewEnvironmentSubdomain ¶
func NewEnvironmentSubdomain(environment Environment, subdomain string) *EnvironmentSubdomain
type OAuthAccessToken ¶
func (*OAuthAccessToken) IsValid ¶
func (t *OAuthAccessToken) IsValid() bool
type OAuthSdkCredentials ¶
type OAuthSdkCredentials struct {
//HttpClient
ClientId string
ClientSecret string
AuthorizationUri string
Scopes []string
AccessToken *OAuthAccessToken
Log StdLogger
}
func NewOAuthSdkCredentials ¶
func NewOAuthSdkCredentials( clientId, clientSecret, authorizationUri string, scopes []string, logger StdLogger, ) (*OAuthSdkCredentials, error)
func (*OAuthSdkCredentials) GetAccessToken ¶
func (f *OAuthSdkCredentials) GetAccessToken() error
func (*OAuthSdkCredentials) GetAuthorization ¶
func (f *OAuthSdkCredentials) GetAuthorization(authorizationType AuthorizationType) (*SdkAuthorization, error)
type OAuthServiceResponse ¶
type PlatformType ¶
type PlatformType string
const ( Previous PlatformType = "PREVIOUS" Default PlatformType = "DEFAULT" DefaultOAuth PlatformType = "DEFAULT_OAUTH" Custom PlatformType = "CUSTOM" )
type PreviousKeysSdkCredentials ¶
type PreviousKeysSdkCredentials struct {
StaticKeys
}
func NewPreviousKeysSdkCredentials ¶
func NewPreviousKeysSdkCredentials(secretKey string, publicKey string) *PreviousKeysSdkCredentials
func (*PreviousKeysSdkCredentials) GetAuthorization ¶
func (c *PreviousKeysSdkCredentials) GetAuthorization(authorizationType AuthorizationType) (*SdkAuthorization, error)
type SdkAuthorization ¶
type SdkAuthorization struct {
PlatformType PlatformType
Credential string
}
func (*SdkAuthorization) GetAuthorizationHeader ¶
func (s *SdkAuthorization) GetAuthorizationHeader() (string, error)
type SdkBuilder ¶
type SdkBuilder struct {
EnableTelemetry *bool
Environment Environment
EnvironmentSubdomain *EnvironmentSubdomain
HttpClient *http.Client
Logger StdLogger
}
func (*SdkBuilder) GetConfiguration ¶
func (s *SdkBuilder) GetConfiguration(string, string) *Configuration
type SdkCredentials ¶
type SdkCredentials interface {
GetAuthorization(authorizationType AuthorizationType) (*SdkAuthorization, error)
}
type StaticKeys ¶
type StaticKeysBuilder ¶
type StaticKeysBuilder struct {
SdkBuilder
PublicKey string
SecretKey string
}
func (*StaticKeysBuilder) ValidatePublicKey ¶
func (s *StaticKeysBuilder) ValidatePublicKey(regex string) error
func (*StaticKeysBuilder) ValidateSecretKey ¶
func (s *StaticKeysBuilder) ValidateSecretKey(regex string) error
Click to show internal directories.
Click to hide internal directories.