adyen

package
v1.0.250 Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2020 License: MIT Imports: 8 Imported by: 0

Documentation

Index

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
}

func NewClient

func NewClient(apiKey string, merchantAccount string) *AdyenClient

func NewWithHTTPClient

func NewWithHTTPClient(apiKey string, merchantAccount string, httpClient *http.Client) *AdyenClient

func (*AdyenClient) Authorize

func (client *AdyenClient) Authorize(request *sleet.AuthorizationRequest) (*sleet.AuthorizationResponse, error)

func (*AdyenClient) Capture

func (client *AdyenClient) Capture(request *sleet.CaptureRequest) (*sleet.CaptureResponse, error)

func (*AdyenClient) Refund

func (client *AdyenClient) Refund(request *sleet.RefundRequest) (*sleet.RefundResponse, error)

func (*AdyenClient) Void

func (client *AdyenClient) Void(request *sleet.VoidRequest) (*sleet.VoidResponse, error)

type AuthRequest

type AuthRequest struct {
	Amount          ModificationAmount `json:"amount"` // kind of a weird name for authorize but lets share with capture
	Card            *CreditCard        `json:"card"`
	Reference       string             `json:"reference"`
	MerchantAccount string             `json:"merchantAccount"`
}

type AuthResponse

type AuthResponse struct {
	Reference string `json:"pspReference"`
}

type CreditCard

type CreditCard struct {
	Type        string `json:"type"`
	Number      string `json:"number"`
	ExpiryMonth string `json:"expiryMonth"`
	ExpiryYear  string `json:"expiryYear"`
	CVC         string `json:"cvc"`
	HolderName  string `json:"holderName"`
}

type ModificationAmount

type ModificationAmount struct {
	Value    int64  `json:"value"`
	Currency string `json:"currency"`
}

type PostAuthRequest

type PostAuthRequest struct {
	OriginalReference  string              `json:"originalReference"`
	ModificationAmount *ModificationAmount `json:"modificationAmount,omitempty"`
	MerchantAccount    string              `json:"merchantAccount"`
}

Jump to

Keyboard shortcuts

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