tillpay

package
v1.3.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: 5 Imported by: 0

Documentation

Overview

Package tillpay mocks the TillPayment acquirer API.

Real-world shape (from TillPayment's merchant integration docs and the production reference DTO): HMAC-SHA512 signed requests, responses carry `{ success, uuid, purchaseId, returnType, paymentMethod }`, and webhooks use a separate envelope centred on `{ result, transactionStatus, uuid }`. The `amount` field on the webhook is a *string*, not a number — a TillPayment quirk we preserve so integration consumers see realistic data.

DTO shapes for TillPayment's transaction response and webhook notifications. Derived from the production reference library (test-dto-/tillpayment.go). Scoped to the fields this mock emits; extend when a failure mode needs more surface area. TillPayment is a card-acquiring platform; its wire format centres around a `uuid` (gateway txn id), a `purchaseId`, and a success/result/transactionStatus triple.

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

Jump to

Keyboard shortcuts

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