serviceadyen

package
v8.17.1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2023 License: Unlicense Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDropInPayment

func NewDropInPayment(ctx context.Context, order *db.Order, cartCheckout *db.CartCheckout, returnURL string) (*checkout.CreateCheckoutSessionResponse, error)

NewDropInPayment contains order that is converted from shopping cart and hence doesn't have checkout data. We must pass checkout data separately.

func NewTender

func NewTender(ctx context.Context, pos, orderId string, amount float32) error

func ProcessRedirect added in v8.1.0

func ProcessRedirect(ctx context.Context, sessionID, redirectResult string) (*checkout.PaymentDetailsResponse, error)

Types

type AmountsReq

type AmountsReq struct {
	Currency        string  `json:"Currency"`
	RequestedAmount float32 `json:"RequestedAmount"`
}

type MessageHeader

type MessageHeader struct {
	ProtocolVersion string `json:"ProtocolVersion"`
	MessageClass    string `json:"MessageClass"`
	MessageCategory string `json:"MessageCategory"`
	MessageType     string `json:"MessageType"`
	SaleID          string `json:"SaleID"`
	ServiceID       string `json:"ServiceID"`
	POIID           string `json:"POIID"`
}

type PaymentRequest

type PaymentRequest struct {
	SaleData           SaleData           `json:"SaleData"`
	PaymentTransaction PaymentTransaction `json:"PaymentTransaction"`
}

type PaymentTransaction

type PaymentTransaction struct {
	AmountsReq AmountsReq `json:"AmountsReq"`
}

type RefundOptions

type RefundOptions struct {
	PSPRef      string
	Value       string
	MerchantRef string
}

type SaleData

type SaleData struct {
	SaleTransactionID SaleTransactionID `json:"SaleTransactionID"`
}

type SaleToPOIRequest

type SaleToPOIRequest struct {
	MessageHeader  MessageHeader  `json:"MessageHeader"`
	PaymentRequest PaymentRequest `json:"PaymentRequest"`
}

type SaleTransactionID

type SaleTransactionID struct {
	TransactionID string `json:"TransactionID"`
	TimeStamp     string `json:"TimeStamp"`
}

type TerminalAPIRequest

type TerminalAPIRequest struct {
	SaleToPOIRequest SaleToPOIRequest `json:"SaleToPOIRequest"`
}

Jump to

Keyboard shortcuts

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