Documentation
¶
Index ¶
- Constants
- type APIConnectionError
- type APIError
- type AuthenticationError
- type Client
- func (c Client) AdjustAuthorise(params *types.ModificationAdjustAuthoriseParams) (*types.ModificationAdjustAuthorise, error)
- func (c Client) Authorise(params *types.PaymentAuthoriseParams, version string) (*types.PaymentAuthorise, error)
- func (c Client) Authorise3d(params *types.PaymentAuthorise3dParams, version string) (*types.PaymentAuthorise, error)
- func (c Client) AuthoriseForRecurring(params *types.PaymentAuthoriseForRecurringParams, version string) (*types.PaymentAuthorise, error)
- func (c Client) AuthoriseOneClick(params *types.PaymentAuthoriseOneClickParams, version string) (*types.PaymentAuthorise, error)
- func (c Client) AuthoriseRecurring(params *types.PaymentAuthoriseRecurringParams, version string) (*types.PaymentAuthorise, error)
- func (c Client) Cancel(params *types.ModificationCancelParams) (*types.ModificationCancel, error)
- func (c Client) CancelOrRefund(params *types.ModificationCancelOrRefundParams) (*types.ModificationCancelOrRefund, error)
- func (c Client) Capture(params *types.ModificationCaptureParams) (*types.ModificationCapture, error)
- func (c Client) Disable(params *types.RecurringDisableParams) (*types.RecurringDisable, error)
- func (c Client) ListRecurringDetails(params *types.RecurringDetailsParams) (*types.RecurringDetails, error)
- func (c Client) Refund(params *types.ModificationRefundParams) (*types.ModificationRefund, error)
- func (c *Client) SetDebug(value bool)
- func (c Client) TechnicalCancel(params *types.ModificationTechnicalCancelParams) (*types.ModificationTechnicalCancel, error)
- type ClientModification
- type ClientPayment
- type ClientRecurring
- type Configuration
- type Error
- type ErrorType
- type InvalidRequestError
- type NotFoundError
- type PermissionError
- type UnprocessableError
Constants ¶
const Version = "1.0.0"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIConnectionError ¶
type APIConnectionError struct {
// contains filtered or unexported fields
}
APIConnectionError is a failure to connect to the Adyen API.
func (*APIConnectionError) Error ¶
func (e *APIConnectionError) Error() string
Error serializes the error object to JSON and returns it as a string.
type APIError ¶
type APIError struct {
// contains filtered or unexported fields
}
APIError is a catch all for any errors not covered by other types (and should be extremely uncommon).
type AuthenticationError ¶
type AuthenticationError struct {
// contains filtered or unexported fields
}
AuthenticationError is a failure to properly authenticate during a request.
func (*AuthenticationError) Error ¶
func (e *AuthenticationError) Error() string
Error serializes the error object to JSON and returns it as a string.
type Client ¶
Client struct
func (Client) AdjustAuthorise ¶
func (c Client) AdjustAuthorise(params *types.ModificationAdjustAuthoriseParams) (*types.ModificationAdjustAuthorise, error)
AdjustAuthorise func
func (Client) Authorise ¶
func (c Client) Authorise(params *types.PaymentAuthoriseParams, version string) (*types.PaymentAuthorise, error)
Authorise func
func (Client) Authorise3d ¶
func (c Client) Authorise3d(params *types.PaymentAuthorise3dParams, version string) (*types.PaymentAuthorise, error)
Authorise3d func
func (Client) AuthoriseForRecurring ¶
func (c Client) AuthoriseForRecurring(params *types.PaymentAuthoriseForRecurringParams, version string) (*types.PaymentAuthorise, error)
AuthoriseForRecurring func
func (Client) AuthoriseOneClick ¶
func (c Client) AuthoriseOneClick(params *types.PaymentAuthoriseOneClickParams, version string) (*types.PaymentAuthorise, error)
AuthoriseOneClick func
func (Client) AuthoriseRecurring ¶
func (c Client) AuthoriseRecurring(params *types.PaymentAuthoriseRecurringParams, version string) (*types.PaymentAuthorise, error)
AuthoriseRecurring func
func (Client) Cancel ¶
func (c Client) Cancel(params *types.ModificationCancelParams) (*types.ModificationCancel, error)
Cancel func
func (Client) CancelOrRefund ¶
func (c Client) CancelOrRefund(params *types.ModificationCancelOrRefundParams) (*types.ModificationCancelOrRefund, error)
CancelOrRefund func
func (Client) Capture ¶
func (c Client) Capture(params *types.ModificationCaptureParams) (*types.ModificationCapture, error)
Capture func
func (Client) Disable ¶
func (c Client) Disable(params *types.RecurringDisableParams) (*types.RecurringDisable, error)
Disable func
func (Client) ListRecurringDetails ¶
func (c Client) ListRecurringDetails(params *types.RecurringDetailsParams) (*types.RecurringDetails, error)
ListRecurringDetails func
func (Client) Refund ¶
func (c Client) Refund(params *types.ModificationRefundParams) (*types.ModificationRefund, error)
Refund func
func (*Client) SetDebug ¶
SetDebug enables additional tracing globally. The method is designed for used during testing.
func (Client) TechnicalCancel ¶
func (c Client) TechnicalCancel(params *types.ModificationTechnicalCancelParams) (*types.ModificationTechnicalCancel, error)
TechnicalCancel func
type ClientModification ¶
type ClientModification interface {
Capture(params *types.ModificationCaptureParams) (*types.ModificationCapture, error)
Cancel(params *types.ModificationCancelParams) (*types.ModificationCancel, error)
Refund(params *types.ModificationRefundParams) (*types.ModificationRefund, error)
CancelOrRefund(params *types.ModificationCancelOrRefundParams) (*types.ModificationCancelOrRefund, error)
AdjustAuthorise(params *types.ModificationAdjustAuthoriseParams) (*types.ModificationAdjustAuthorise, error)
TechnicalCancel(params *types.ModificationTechnicalCancelParams) (*types.ModificationTechnicalCancelParams, error)
}
ClientModification interface
type ClientPayment ¶
type ClientPayment interface {
Authorise(params *types.PaymentAuthoriseParams, version string) (*types.PaymentAuthorise, error)
Authorise3d(params *types.PaymentAuthorise3dParams, version string) (*types.PaymentAuthorise, error)
AuthoriseForRecurring(params *types.PaymentAuthoriseForRecurringParams, version string) (*types.PaymentAuthorise, error)
AuthoriseRecurring(params *types.PaymentAuthoriseRecurringParams, version string) (*types.PaymentAuthorise, error)
AuthoriseOneClick(params *types.PaymentAuthoriseOneClickParams, version string) (*types.PaymentAuthorise, error)
}
ClientPayment interface
type ClientRecurring ¶
type ClientRecurring interface {
ListRecurringDetails(params *types.RecurringDetailsParams) (*types.RecurringDetails, error)
Disable(params *types.RecurringDisableParams) (*types.RecurringDisable, error)
}
ClientRecurring interface
type Configuration ¶
type Configuration struct {
Password string `toml:"password" json:"password"`
Username string `toml:"username" json:"username"`
Live bool `toml:"live" json:"live"`
ProxyHost string `toml:"proxy_host" json:"proxy_host"`
ProxyPort int `toml:"proxy_port" json:"proxy_port"`
}
Configuration represents the MySQL configuration
func NewConfiguration ¶
func NewConfiguration() Configuration
NewConfiguration generates a Configuration
func (*Configuration) GetHTTPProxy ¶
GetHTTPProxy func
type Error ¶
type Error struct {
// Err contains an internal error with an additional level of granularity
// that can be used in some cases to get more detailed information about
// what went wrong. For example, Err may hold a ChargeError that indicates
// exactly what went wrong during a charge.
Err error `json:"-"`
HTTPStatusCode int `json:"status"`
Type ErrorType `json:"type"`
Message string `json:"message"`
}
Error is the response returned when a call is unsuccessful.
type ErrorType ¶
type ErrorType string
ErrorType is the list of allowed values for the error's msg.
const ( ErrorTypeAPI ErrorType = "Default" // default ErrorTypeInvalidRequest ErrorType = "400 Bad Request" // 400 ErrorTypeAuthentication ErrorType = "401 Unauthorized" // 401 ErrorTypePermission ErrorType = "403 Forbidden" // 403 ErrorTypeNotFound ErrorType = "404 Not Found" // 404 ErrorTypeUnprocessable ErrorType = "422 Unprocessable Entity" // 422 ErrorTypeAPIConnection ErrorType = "500 Internal Server Error" // 500 )
Error Types
type InvalidRequestError ¶
type InvalidRequestError struct {
// contains filtered or unexported fields
}
InvalidRequestError is an error that occurs when a request contains invalid parameters.
func (*InvalidRequestError) Error ¶
func (e *InvalidRequestError) Error() string
Error serializes the error object to JSON and returns it as a string.
type NotFoundError ¶
type NotFoundError struct {
// contains filtered or unexported fields
}
NotFoundError results when you attempt to make an API request for which your API key doesn't have the right permissions.
func (*NotFoundError) Error ¶
func (e *NotFoundError) Error() string
Error serializes the error object to JSON and returns it as a string.
type PermissionError ¶
type PermissionError struct {
// contains filtered or unexported fields
}
PermissionError results when you attempt to make an API request for which your API key doesn't have the right permissions.
func (*PermissionError) Error ¶
func (e *PermissionError) Error() string
Error serializes the error object to JSON and returns it as a string.
type UnprocessableError ¶
type UnprocessableError struct {
// contains filtered or unexported fields
}
UnprocessableError results when you attempt to make an API request for which your API key doesn't have the right permissions.
func (*UnprocessableError) Error ¶
func (e *UnprocessableError) Error() string
Error serializes the error object to JSON and returns it as a string.