adyen

package
v0.0.0-...-cb7f019 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2021 License: BSD-3-Clause Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CardTypeSource = map[string]string{
	"Apple Pay":  "applepay",
	"Google Pay": "paywithgoogle",
}

Functions

This section is empty.

Types

type AdyenAmountParams

type AdyenAmountParams struct {
	Value    int    `json:"value"`
	Currency string `json:"currency"`
}

type AdyenAuthoriseAdditionalDataParams

type AdyenAuthoriseAdditionalDataParams struct {
	Card               string `json:"card.encrypted.json"`
	Type               string `json:"paymentdatasource.type"`
	SelectedBrand      string `json:"selectedBrand"`
	ShopperInteraction string `json:"shopperInteraction"`
}

type AdyenAuthoriseMpiDataParams

type AdyenAuthoriseMpiDataParams struct {
	AuthenticationResponse string `json:"authenticationResponse"`
	DirectoryResponse      string `json:"directoryResponse"`
	Cavv                   string `json:"cavv"`
	Eci                    string `json:"eci"`
}

type AdyenAuthoriseParams

type AdyenAuthoriseParams struct {
	Reference       string                             `json:"reference"`
	MerchantAccount string                             `json:"merchantAccount"`
	Amount          AdyenAmountParams                  `json:"amount"`
	AdditionalData  AdyenAuthoriseAdditionalDataParams `json:"additionalData"`
	MpiData         AdyenAuthoriseMpiDataParams        `json:"mpiData"`
}

type AdyenCaptureParams

type AdyenCaptureParams struct {
	Reference          string            `json:"reference"`
	MerchantAccount    string            `json:"merchantAccount"`
	ModificationAmount AdyenAmountParams `json:"modificationAmount"`
	OriginalReference  string            `json:"originalReference"`
}

type AdyenCredentials

type AdyenCredentials struct {
	Username        []byte `json:"username"`
	Password        []byte `json:"password"`
	MerchantAccount string `json:"merchantAccount"`
	CsePublicKey    string `json:"csePublicKey"`
	LiveUrlPrefix   string `json:"liveUrlPrefix"`
}

func (*AdyenCredentials) AuthKey

func (a *AdyenCredentials) AuthKey() string

type AdyenGooglePayParams

type AdyenGooglePayParams struct {
	Reference       string                            `json:"reference"`
	MerchantAccount string                            `json:"merchantAccount"`
	Amount          AdyenAmountParams                 `json:"amount"`
	PaymentMethod   AdyenGooglePayPaymentMethodParams `json:"paymentMethod"`
}

type AdyenGooglePayPaymentMethodParams

type AdyenGooglePayPaymentMethodParams struct {
	Type  string `json:"type"`
	Token string `json:"paywithgoogle.token"`
}

type CardEncryptParams

type CardEncryptParams struct {
	Number     string `json:"number"`
	ExpMonth   string `json:"expiryMonth"`
	ExpYear    string `json:"expiryYear"`
	Cvc        string `json:"cvc,omitempty"`
	HolderName string `json:"holderName"`
}

type Gateway

type Gateway buyte.Gateway

func New

func New(ctx context.Context, connection *buyte.ProviderCheckoutConnection) (*Gateway, error)

func (*Gateway) AdyenCredentials

func (g *Gateway) AdyenCredentials() *AdyenCredentials

func (*Gateway) Charge

func (g *Gateway) Charge(input *buyte.CreateChargeInput, networkToken *buyte.NetworkToken, paymentToken *buyte.PaymentToken) (*buyte.GatewayCharge, error)

func (*Gateway) ChargeNative

func (g *Gateway) ChargeNative(input *buyte.CreateChargeInput, nativeToken string, paymentToken *buyte.PaymentToken) (*buyte.GatewayCharge, error)

func (*Gateway) Encrypt

func (g *Gateway) Encrypt(params *CardEncryptParams) (string, error)

func (*Gateway) IsConnect

func (g *Gateway) IsConnect() bool

For now.

func (*Gateway) Post

func (g *Gateway) Post(url string, jsonBody []byte) ([]byte, error)

Jump to

Keyboard shortcuts

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