adyen

package module
v0.0.0-...-56af7ee Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 6, 2022 License: MIT Imports: 13 Imported by: 0

README

go-adyen

Work In Progress

Documentation

Index

Constants

View Source
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).

func (*APIError) Error

func (e *APIError) Error() string

Error serializes the error object to JSON and returns it as a string.

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

type Client struct {
	HttpClient *http.Client
	// contains filtered or unexported fields
}

Client struct

func New

func New(config *Configuration) *Client

New func

func (Client) AdjustAuthorise

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

Cancel func

func (Client) CancelOrRefund

CancelOrRefund func

func (Client) Capture

Capture func

func (Client) Disable

Disable func

func (Client) ListRecurringDetails

func (c Client) ListRecurringDetails(params *types.RecurringDetailsParams) (*types.RecurringDetails, error)

ListRecurringDetails func

func (Client) Refund

Refund func

func (*Client) SetDebug

func (c *Client) SetDebug(value bool)

SetDebug enables additional tracing globally. The method is designed for used during testing.

func (Client) TechnicalCancel

TechnicalCancel func

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

func (c *Configuration) GetHTTPProxy() (func(*http.Request) (*url.URL, error), error)

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.

func (*Error) Error

func (e *Error) Error() string

Error serializes the error object to JSON and returns it as a string.

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.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL