paynamics

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 paynamics mocks Paynamics's (PH / SEA) payment API surface. Real-world shape: MD5-signed JSON envelopes with a response_code / response_advise / response_message triple. "GR001" is the canonical success code; "GR051" and the "GR0xx" family cover failures. The mock emits a fixed signature placeholder — callers verifying MD5 must detect the prefix and skip verification.

DTO shapes for Paynamics (PH / SEA) payment API surface. Derived from the production reference library (test-dto-/payments.go, structs: PaynamicsInitRespPayload, PaynamicsQueryRespPayload, PaynamicsRefundRespPayload, PaynamicsWebhookPayload, ...).

Paynamics uses an MD5-signed JSON envelope with a response_code / response_advise / response_message triple — "GR001" is the canonical success code; "GR051" and "GR0xx" cover the failure taxonomy. The real gateway historically emitted form-encoded responses; modern integrations use JSON. The mock emits JSON exclusively with a fixed signature placeholder.

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