adyen

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package adyen mocks Adyen's payment API surface. Real-world shape: resultCode + pspReference + additionalData map.

DTO shapes for Adyen's /payments response and webhook notifications. Derived from the production reference library (test-dto-/adyen.go). Kept scoped to the fields this mock emits; extend when a failure mode needs more surface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter struct{}

func New

func New() *Adapter

func (*Adapter) BuildResponse

func (a *Adapter) BuildResponse(result *engine.Result, body []byte) (int, []byte, map[string]string)

func (*Adapter) BuildWebhookPayload

func (a *Adapter) BuildWebhookPayload(result *engine.Result, chargeID string, amount int64, currency string, requestBody map[string]any) map[string]any

func (*Adapter) Name

func (a *Adapter) Name() string

type Amount

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

Amount — minor-units value + ISO currency. Shared by request, response, and webhook. Adyen sends int64 minor units in webhooks; the response uses the same shape.

Jump to

Keyboard shortcuts

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