Documentation
¶
Overview ¶
Package komoju mocks Komoju (Japan) payment API. Real-world shape: resource-oriented JSON — `{ id, resource: "payment", status, amount, ... }` on success; `{ error: { code, message, ... } }` on failure. Webhook is wrapped in an event envelope:
{ id, type: "payment.<state>", resource: "event", data: {...payment...} }
DTO shapes for Komoju's (Japan) payment API. Derived from the production reference library (test-dto-/payments.go, structs: KomojuInitResPayload, KomojuWebhookPayload, KomojuErrorPayload, KomojuCardTokenResponse, KomojuRefundRequsetPayload).
Komoju's API is resource-oriented — most responses carry a `resource` discriminator ("payment", "event", "refund"). Status lifecycle is:
authorized → captured → refunded
with failed/cancelled as terminal sad paths. Amounts are plain int (JPY has no minor units anyway).
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Adapter ¶
type Adapter struct{}