Documentation ¶
Index ¶
- type AdyenClient
- func (client *AdyenClient) Authorize(request *sleet.AuthorizationRequest) (*sleet.AuthorizationResponse, error)
- func (client *AdyenClient) Capture(request *sleet.CaptureRequest) (*sleet.CaptureResponse, error)
- func (client *AdyenClient) Refund(request *sleet.RefundRequest) (*sleet.RefundResponse, error)
- func (client *AdyenClient) Void(request *sleet.VoidRequest) (*sleet.VoidResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdyenClient ¶
type AdyenClient struct {
// contains filtered or unexported fields
}
AdyenClient represents the authentication fields needed to make API Requests for a given environment Client functions return error for http error and will return Success=true if action is performed successfully You can create new API user there: https://ca-test.adyen.com/ca/ca/config/users.shtml
func NewClient ¶
func NewClient(env adyen.Environment, username string, merchantAccount string, password string) *AdyenClient
NewClient creates an Adyen client with creds and default http client
func NewWithHTTPClient ¶
func NewWithHTTPClient(env adyen.Environment, username string, merchantAccount string, password string, httpClient *http.Client) *AdyenClient
NewWithHTTPClient creates an Adyen client with creds and user specified http client for custom behavior
func (*AdyenClient) Authorize ¶
func (client *AdyenClient) Authorize(request *sleet.AuthorizationRequest) (*sleet.AuthorizationResponse, error)
Authorize through Adyen gateway. This transaction must be captured for funds to be received
func (*AdyenClient) Capture ¶
func (client *AdyenClient) Capture(request *sleet.CaptureRequest) (*sleet.CaptureResponse, error)
Capture an existing transaction by reference
func (*AdyenClient) Refund ¶
func (client *AdyenClient) Refund(request *sleet.RefundRequest) (*sleet.RefundResponse, error)
Refund a captured transaction by reference with specified amount
func (*AdyenClient) Void ¶
func (client *AdyenClient) Void(request *sleet.VoidRequest) (*sleet.VoidResponse, error)
Void an authorized transaction (cancels the authorization)