Files
zeekay 639550fdd3 feat(provider/square): forward CreatePaymentRequest.IdempotencyKey
CreatePayment now sets the JSON body field idempotency_key (Square's
required shape — per developer.squareup.com/docs/working-with-apis/
idempotency, NOT a header) from req.IdempotencyKey.

Drops the previous wall-clock-derived "lux_<UnixNano>" value, which
was worse than nothing because retries got fresh keys and Square
would happily create duplicate payments. Empty IdempotencyKey now
falls back to provider.DeriveIdempotencyKey, computed over the body
BEFORE the idempotency_key field is added to avoid self-feedback.

Hermetic httptest covers caller-supplied (body-field) and
deterministic-fallback paths.
2026-05-24 19:14:59 -07:00
..